From 18e7f16b6a2eae7f1330dc3d0ecd2b7b20a77f51 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 29 Sep 2020 10:51:23 +0300 Subject: [PATCH 1/8] init --- package-lock.json | 8 +- package.json | 2 +- tests/compiler/abi.optimized.wat | 2 +- tests/compiler/abi.untouched.wat | 18 +- tests/compiler/binary.optimized.wat | 6 +- tests/compiler/binary.untouched.wat | 98 +- tests/compiler/builtins.optimized.wat | 876 +---------- tests/compiler/builtins.untouched.wat | 34 +- tests/compiler/call-super.optimized.wat | 2 +- tests/compiler/call-super.untouched.wat | 2 +- tests/compiler/class-implements.optimized.wat | 2 +- tests/compiler/class-implements.untouched.wat | 2 +- .../compiler/class-overloading.optimized.wat | 4 +- .../compiler/class-overloading.untouched.wat | 4 +- tests/compiler/class.optimized.wat | 2 +- tests/compiler/class.untouched.wat | 4 +- tests/compiler/const-folding.optimized.wat | 2 +- tests/compiler/const-folding.untouched.wat | 2 +- tests/compiler/constructor.optimized.wat | 2 +- tests/compiler/constructor.untouched.wat | 2 +- tests/compiler/do.optimized.wat | 10 +- tests/compiler/do.untouched.wat | 16 +- tests/compiler/exports.optimized.wat | 2 +- tests/compiler/exports.untouched.wat | 2 +- .../exportstar-rereexport.optimized.wat | 2 +- .../exportstar-rereexport.untouched.wat | 2 +- .../extends-baseaggregate.optimized.wat | 16 +- .../extends-baseaggregate.untouched.wat | 44 +- .../compiler/extends-recursive.untouched.wat | 2 +- .../field-initialization.optimized.wat | 4 +- .../field-initialization.untouched.wat | 4 +- tests/compiler/for.optimized.wat | 10 +- tests/compiler/for.untouched.wat | 16 +- tests/compiler/function-call.optimized.wat | 2 +- tests/compiler/function-call.untouched.wat | 2 +- .../function-expression.optimized.wat | 2 +- .../function-expression.untouched.wat | 2 +- tests/compiler/getter-call.optimized.wat | 2 +- tests/compiler/getter-call.untouched.wat | 2 +- .../implicit-getter-setter.optimized.wat | 14 +- .../implicit-getter-setter.untouched.wat | 16 +- tests/compiler/infer-array.optimized.wat | 2 +- tests/compiler/infer-array.untouched.wat | 26 +- tests/compiler/inlining.optimized.wat | 2 +- tests/compiler/inlining.untouched.wat | 2 +- tests/compiler/instanceof-class.optimized.wat | 2 +- tests/compiler/instanceof-class.untouched.wat | 2 +- tests/compiler/issues/1095.optimized.wat | 10 +- tests/compiler/issues/1095.untouched.wat | 16 +- tests/compiler/issues/1225.optimized.wat | 10 +- tests/compiler/issues/1225.untouched.wat | 16 +- tests/compiler/logical.optimized.wat | 10 +- tests/compiler/logical.untouched.wat | 16 +- tests/compiler/managed-cast.optimized.wat | 10 +- tests/compiler/managed-cast.untouched.wat | 16 +- tests/compiler/many-locals.optimized.wat | 2 +- tests/compiler/many-locals.untouched.wat | 2 +- tests/compiler/memcpy.optimized.wat | 24 +- tests/compiler/memcpy.untouched.wat | 24 +- tests/compiler/new.optimized.wat | 2 +- tests/compiler/new.untouched.wat | 2 +- tests/compiler/number.optimized.wat | 42 +- tests/compiler/number.untouched.wat | 74 +- tests/compiler/object-literal.optimized.wat | 16 +- tests/compiler/object-literal.untouched.wat | 42 +- .../optional-typeparameters.optimized.wat | 2 +- .../optional-typeparameters.untouched.wat | 2 +- tests/compiler/overflow.optimized.wat | 12 + tests/compiler/overflow.untouched.wat | 36 +- .../portable-conversions.untouched.wat | 16 +- tests/compiler/rc/global-init.untouched.wat | 8 +- tests/compiler/rc/local-init.optimized.wat | 10 +- tests/compiler/rc/local-init.untouched.wat | 16 +- .../rc/logical-and-mismatch.optimized.wat | 10 +- .../rc/logical-and-mismatch.untouched.wat | 16 +- .../rc/logical-or-mismatch.optimized.wat | 10 +- .../rc/logical-or-mismatch.untouched.wat | 16 +- tests/compiler/rc/optimize.optimized.wat | 10 +- tests/compiler/rc/optimize.untouched.wat | 16 +- tests/compiler/rc/rereturn.optimized.wat | 14 +- tests/compiler/rc/rereturn.untouched.wat | 16 +- .../rc/ternary-mismatch.optimized.wat | 10 +- .../rc/ternary-mismatch.untouched.wat | 16 +- tests/compiler/reexport.optimized.wat | 2 +- tests/compiler/reexport.untouched.wat | 2 +- tests/compiler/rereexport.optimized.wat | 2 +- tests/compiler/rereexport.untouched.wat | 2 +- tests/compiler/resolve-access.optimized.wat | 2 +- tests/compiler/resolve-access.untouched.wat | 34 +- tests/compiler/resolve-binary.optimized.wat | 50 +- tests/compiler/resolve-binary.untouched.wat | 116 +- .../resolve-elementaccess.optimized.wat | 42 +- .../resolve-elementaccess.untouched.wat | 78 +- .../resolve-function-expression.optimized.wat | 6 +- .../resolve-function-expression.untouched.wat | 12 +- tests/compiler/resolve-nested.optimized.wat | 2 +- tests/compiler/resolve-nested.untouched.wat | 2 +- tests/compiler/resolve-new.optimized.wat | 2 +- tests/compiler/resolve-new.untouched.wat | 2 +- .../resolve-propertyaccess.optimized.wat | 6 +- .../resolve-propertyaccess.untouched.wat | 12 +- tests/compiler/resolve-ternary.optimized.wat | 52 +- tests/compiler/resolve-ternary.untouched.wat | 88 +- tests/compiler/resolve-unary.optimized.wat | 6 +- tests/compiler/resolve-unary.untouched.wat | 12 +- tests/compiler/retain-i32.optimized.wat | 12 +- tests/compiler/retain-i32.untouched.wat | 42 +- .../retain-release-sanity.optimized.wat | 18 +- .../retain-release-sanity.untouched.wat | 52 +- tests/compiler/retain-release.optimized.wat | 2 +- tests/compiler/retain-release.untouched.wat | 2 +- tests/compiler/retain-return.optimized.wat | 10 +- tests/compiler/retain-return.untouched.wat | 16 +- tests/compiler/rt/finalize.optimized.wat | 16 +- tests/compiler/rt/finalize.untouched.wat | 46 +- tests/compiler/rt/instanceof.optimized.wat | 2 +- tests/compiler/rt/instanceof.untouched.wat | 2 +- tests/compiler/rt/stub-realloc.optimized.wat | 2 +- tests/compiler/rt/stub-realloc.untouched.wat | 26 +- tests/compiler/runtime-full.optimized.wat | 14 +- tests/compiler/runtime-full.untouched.wat | 16 +- tests/compiler/runtime-stub.optimized.wat | 2 +- tests/compiler/runtime-stub.untouched.wat | 2 +- tests/compiler/std/array-access.optimized.wat | 2 +- tests/compiler/std/array-access.untouched.wat | 2 +- .../compiler/std/array-literal.optimized.wat | 14 +- .../compiler/std/array-literal.untouched.wat | 40 +- tests/compiler/std/array.optimized.wat | 182 +-- tests/compiler/std/array.untouched.wat | 298 ++-- tests/compiler/std/arraybuffer.optimized.wat | 16 +- tests/compiler/std/arraybuffer.untouched.wat | 42 +- tests/compiler/std/dataview.optimized.wat | 150 +- tests/compiler/std/dataview.untouched.wat | 96 +- tests/compiler/std/date.optimized.wat | 2 +- tests/compiler/std/date.untouched.wat | 2 +- tests/compiler/std/hash.optimized.wat | 2 +- tests/compiler/std/hash.untouched.wat | 22 +- tests/compiler/std/map.optimized.wat | 270 ++-- tests/compiler/std/map.untouched.wat | 178 +-- tests/compiler/std/math.optimized.wat | 456 +++--- tests/compiler/std/math.untouched.wat | 476 +++--- tests/compiler/std/mod.optimized.wat | 22 +- tests/compiler/std/mod.untouched.wat | 22 +- tests/compiler/std/new.optimized.wat | 2 +- tests/compiler/std/new.untouched.wat | 2 +- tests/compiler/std/object.optimized.wat | 2 +- tests/compiler/std/object.untouched.wat | 2 +- .../std/operator-overloading.optimized.wat | 12 +- .../std/operator-overloading.untouched.wat | 20 +- tests/compiler/std/pointer.untouched.wat | 24 +- tests/compiler/std/polyfills.untouched.wat | 40 +- tests/compiler/std/set.optimized.wat | 214 ++- tests/compiler/std/set.untouched.wat | 138 +- tests/compiler/std/static-array.optimized.wat | 6 +- tests/compiler/std/static-array.untouched.wat | 30 +- tests/compiler/std/staticarray.optimized.wat | 16 +- tests/compiler/std/staticarray.untouched.wat | 42 +- .../std/string-casemapping.optimized.wat | 48 +- .../std/string-casemapping.untouched.wat | 82 +- .../std/string-encoding.optimized.wat | 18 +- .../std/string-encoding.untouched.wat | 56 +- tests/compiler/std/string.optimized.wat | 96 +- tests/compiler/std/string.untouched.wat | 138 +- tests/compiler/std/symbol.optimized.wat | 10 +- tests/compiler/std/symbol.untouched.wat | 34 +- tests/compiler/std/typedarray.optimized.wat | 1386 +++++++++++------ tests/compiler/std/typedarray.untouched.wat | 330 ++-- tests/compiler/super-inline.optimized.wat | 2 +- tests/compiler/super-inline.untouched.wat | 2 +- tests/compiler/throw.untouched.wat | 8 +- tests/compiler/typeof.optimized.wat | 4 +- tests/compiler/typeof.untouched.wat | 4 +- tests/compiler/wasi/abort.optimized.wat | 2 +- tests/compiler/wasi/abort.untouched.wat | 14 +- tests/compiler/wasi/seed.optimized.wat | 20 +- tests/compiler/wasi/seed.untouched.wat | 32 +- tests/compiler/wasi/trace.optimized.wat | 36 +- tests/compiler/wasi/trace.untouched.wat | 78 +- tests/compiler/while.optimized.wat | 10 +- tests/compiler/while.untouched.wat | 16 +- 180 files changed, 3895 insertions(+), 4041 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1cf7d8084d..dc6542a89a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1163,9 +1163,9 @@ "optional": true }, "binaryen": { - "version": "97.0.0-nightly.20200919", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-97.0.0-nightly.20200919.tgz", - "integrity": "sha512-BqKZxONTh53SVl2QUqVidoSo/nvL6FMKUG21SvB6V46M1Y6EbJrXES5Nt2c9XYveWpJjA297zIoxTUdI/PMDSA==" + "version": "97.0.0-nightly.20200929", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-97.0.0-nightly.20200929.tgz", + "integrity": "sha512-HQ7VTISqwfVOylWJAE2jIyhuO5zrxTD2Vvc0cwtXTUqfmlbZdt/Z0vxUZD+uFYHRLM0p9ddJc7RPVGsvPI2oEQ==" }, "bluebird": { "version": "3.7.2", @@ -8592,7 +8592,7 @@ } }, "semantic-release": { - "version": "github:dcodeIO/semantic-release#5367f573d21743be81ae1190877a8315405fd364", + "version": "github:dcodeIO/semantic-release#3cec5c74de58a4e539d792c807e82ee4500cf28a", "from": "github:dcodeIO/semantic-release", "dev": true, "requires": { diff --git a/package.json b/package.json index 790cf11f27..ea2fdc2d33 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "97.0.0-nightly.20200919", + "binaryen": "97.0.0-nightly.20200929", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" diff --git a/tests/compiler/abi.optimized.wat b/tests/compiler/abi.optimized.wat index 5898a8f83b..1d79f41980 100644 --- a/tests/compiler/abi.optimized.wat +++ b/tests/compiler/abi.optimized.wat @@ -7,6 +7,6 @@ (export "exportedExported" (func $abi/exported)) (export "exportedInternal" (func $abi/exported)) (func $abi/exported (result i32) - i32.const -128 + i32.const 128 ) ) diff --git a/tests/compiler/abi.untouched.wat b/tests/compiler/abi.untouched.wat index f540d255b1..fb76dec661 100644 --- a/tests/compiler/abi.untouched.wat +++ b/tests/compiler/abi.untouched.wat @@ -30,7 +30,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eqz i32.eqz if @@ -49,7 +49,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 2 i32.div_s local.set $0 @@ -58,7 +58,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 2 i32.div_s local.set $0 @@ -67,7 +67,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eqz i32.eqz if @@ -86,9 +86,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 24 - i32.shr_s + i32.shr_u local.set $0 else local.get $0 @@ -111,7 +111,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u global.set $abi/y global.get $abi/y i32.eqz @@ -186,7 +186,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u ) (func $abi/exportedExported (result i32) call $abi/exported @@ -196,7 +196,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u ) (func $~start call $start:abi diff --git a/tests/compiler/binary.optimized.wat b/tests/compiler/binary.optimized.wat index 818d1ff040..bffe8abf65 100644 --- a/tests/compiler/binary.optimized.wat +++ b/tests/compiler/binary.optimized.wat @@ -31,7 +31,7 @@ local.set $2 local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -81,11 +81,11 @@ global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_s + i32.shr_u global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_u + i32.shr_s global.set $binary/i global.get $binary/i i32.const 1 diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index a7a522d0ef..cea159469e 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -119,7 +119,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -137,7 +137,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -155,7 +155,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -173,7 +173,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -212,7 +212,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -339,11 +339,11 @@ local.set $6 local.get $5 i64.const 52 - i64.shr_u + i64.shr_s local.set $7 local.get $6 i64.const 52 - i64.shr_u + i64.shr_s local.set $8 local.get $7 i64.const 1 @@ -430,7 +430,7 @@ i64.lt_u local.get $6 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.eqz @@ -462,7 +462,7 @@ local.set $10 local.get $5 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 if (result i32) block $~lib/util/math/checkint|inlined.0 (result i32) @@ -470,7 +470,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $11 @@ -532,7 +532,7 @@ end local.get $6 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne if (result f64) @@ -546,7 +546,7 @@ end local.get $5 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne if @@ -555,7 +555,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $11 @@ -706,14 +706,14 @@ i64.const 52 i64.const 7 i64.sub - i64.shr_u + i64.shr_s i64.const 127 i64.and i32.wrap_i64 local.set $12 local.get $11 i64.const 52 - i64.shr_s + i64.shr_u local.set $13 local.get $9 local.get $11 @@ -932,7 +932,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2047 i32.and @@ -961,7 +961,7 @@ if local.get $9 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne if (result f64) @@ -1235,13 +1235,13 @@ local.set $3 local.get $2 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $5 @@ -1322,7 +1322,7 @@ local.get $2 i32.const -1 i32.const 9 - i32.shr_u + i32.shr_s i32.and local.set $2 local.get $2 @@ -1354,7 +1354,7 @@ local.get $3 i32.const -1 i32.const 9 - i32.shr_u + i32.shr_s i32.and local.set $3 local.get $3 @@ -1454,7 +1454,7 @@ i32.sub i32.const 1 i32.add - i32.shr_u + i32.shr_s local.set $2 end local.get $2 @@ -1647,7 +1647,7 @@ i32.lt_u local.get $6 i32.const 31 - i32.shr_u + i32.shr_s i32.eqz i32.eq if @@ -1679,14 +1679,14 @@ local.set $9 local.get $5 i32.const 31 - i32.shr_u + i32.shr_s if (result i32) block $~lib/util/math/checkintf|inlined.0 (result i32) local.get $6 local.set $8 local.get $8 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $10 @@ -1744,7 +1744,7 @@ end local.get $6 i32.const 31 - i32.shr_u + i32.shr_s if (result f32) f32.const 1 local.get $9 @@ -1756,14 +1756,14 @@ end local.get $5 i32.const 31 - i32.shr_u + i32.shr_s if block $~lib/util/math/checkintf|inlined.1 (result i32) local.get $6 local.set $8 local.get $8 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $10 @@ -1866,7 +1866,7 @@ i32.const 23 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 15 i32.and local.set $11 @@ -1880,7 +1880,7 @@ local.set $13 local.get $12 i32.const 23 - i32.shr_s + i32.shr_u local.set $14 i32.const 6152 local.get $11 @@ -1961,7 +1961,7 @@ local.get $21 i64.reinterpret_f64 i64.const 47 - i64.shr_u + i64.shr_s i64.const 65535 i64.and i64.const 32959 @@ -2110,19 +2110,19 @@ local.set $3 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $4 local.get $3 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $5 local.get $2 i64.const 63 - i64.shr_u + i64.shr_s local.set $6 local.get $3 i64.const 1 @@ -2199,7 +2199,7 @@ local.get $2 i64.const -1 i64.const 12 - i64.shr_u + i64.shr_s i64.and local.set $2 local.get $2 @@ -2233,7 +2233,7 @@ local.get $3 i64.const -1 i64.const 12 - i64.shr_u + i64.shr_s i64.and local.set $3 local.get $3 @@ -2333,7 +2333,7 @@ i64.sub i64.const 1 i64.add - i64.shr_u + i64.shr_s local.set $2 end local.get $2 @@ -2400,11 +2400,11 @@ drop global.get $binary/i i32.const 1 - i32.shr_s + i32.shr_u drop global.get $binary/i i32.const 1 - i32.shr_u + i32.shr_s drop global.get $binary/i i32.const 1 @@ -2472,11 +2472,11 @@ global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_s + i32.shr_u global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_u + i32.shr_s global.set $binary/i global.get $binary/i i32.const 1 @@ -2512,11 +2512,11 @@ global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_s + i32.shr_u global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_u + i32.shr_s global.set $binary/i global.get $binary/i i32.const 1 @@ -2585,11 +2585,11 @@ drop global.get $binary/I i64.const 1 - i64.shr_s + i64.shr_u drop global.get $binary/I i64.const 1 - i64.shr_u + i64.shr_s drop global.get $binary/I i64.const 1 @@ -2659,11 +2659,11 @@ global.set $binary/I global.get $binary/I i64.const 1 - i64.shr_s + i64.shr_u global.set $binary/I global.get $binary/I i64.const 1 - i64.shr_u + i64.shr_s global.set $binary/I global.get $binary/I i64.const 1 @@ -2699,11 +2699,11 @@ global.set $binary/I global.get $binary/I i64.const 1 - i64.shr_s + i64.shr_u global.set $binary/I global.get $binary/I i64.const 1 - i64.shr_u + i64.shr_s global.set $binary/I global.get $binary/I i64.const 1 diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 1067470f8e..96fd84fdfd 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -1,12 +1,7 @@ (module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) (data (i32.const 1028) "\01\00\00\00\01") (data (i32.const 1040) "\06\00\00\00\01\00\00\00\01\00\00\00\06\00\00\00a\00b\00c") @@ -35,877 +30,18 @@ (data (i32.const 1856) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00s\00o\00m\00e\00 \00v\00a\00l\00u\00e") (data (i32.const 1904) "\08\00\00\00\01\00\00\00\0b\00\00\00\08\00\00\00\02") (data (i32.const 1936) "\08\00\00\00\01\00\00\00\0c\00\00\00\08\00\00\00\03") - (table $0 4 funcref) - (elem (i32.const 1) $start:builtins~anonymous|0 $start:builtins~anonymous|1 $start:builtins~anonymous|2) - (global $builtins/i (mut i32) (i32.const 0)) - (global $builtins/I (mut i64) (i64.const 0)) - (global $builtins/f (mut f32) (f32.const 0)) - (global $builtins/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) (export "test" (func $start:builtins~anonymous|1)) (start $~start) - (func $start:builtins~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - block $folding-inner0 - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - select - br_if $folding-inner0 - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - local.get $1 - call $~lib/string/String#get:length - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - return - end - i32.const 0 - ) - (func $~lib/atomics/Atomics.isLockFree (param $0 i32) (result i32) - i32.const 1 - local.get $0 - i32.const 4 - i32.eq - i32.const 1 - local.get $0 - i32.const 2 - i32.eq - local.get $0 - i32.const 1 - i32.eq - select - select - ) (func $start:builtins~anonymous|1 nop ) - (func $start:builtins~anonymous|2 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - nop - ) - (func $start:builtins - i32.const 31 - global.set $builtins/i - i32.const 0 - global.set $builtins/i - i32.const 1 - global.set $builtins/i - i32.const 2 - global.set $builtins/i - i32.const -2147483648 - global.set $builtins/i - i32.const 42 - global.set $builtins/i - i32.const 2 - global.set $builtins/i - i32.const 1 - global.set $builtins/i - i64.const 63 - global.set $builtins/I - i64.const 0 - global.set $builtins/I - i64.const 1 - global.set $builtins/I - i64.const 2 - global.set $builtins/I - i64.const -9223372036854775808 - global.set $builtins/I - i64.const 42 - global.set $builtins/I - i64.const 2 - global.set $builtins/I - i64.const 1 - global.set $builtins/I - f32.const nan:0x400000 - global.set $builtins/f - f32.const inf - global.set $builtins/f - f32.const 1.25 - global.set $builtins/f - f32.const 2 - global.set $builtins/f - f32.const 1.25 - global.set $builtins/f - f32.const 1 - global.set $builtins/f - f32.const 2.5 - global.set $builtins/f - f32.const 1.25 - global.set $builtins/f - f32.const 1 - global.set $builtins/f - f32.const 1.1180340051651 - global.set $builtins/f - f32.const 1 - global.set $builtins/f - f64.const nan:0x8000000000000 - global.set $builtins/F - f64.const inf - global.set $builtins/F - f64.const 1.25 - global.set $builtins/F - f64.const 2 - global.set $builtins/F - f64.const 1.25 - global.set $builtins/F - f64.const 1 - global.set $builtins/F - f64.const 2.5 - global.set $builtins/F - f64.const 1.25 - global.set $builtins/F - f64.const 1 - global.set $builtins/F - f64.const 1.118033988749895 - global.set $builtins/F - f64.const 1 - global.set $builtins/F - f64.const 0 - global.set $builtins/F - f32.const 1 - global.set $builtins/f - i32.const 8 - i32.load - global.set $builtins/i - i32.const 8 - global.get $builtins/i - i32.store - i32.const 8 - i32.const 8 - i32.load - i32.store - i32.const 8 - i64.load - global.set $builtins/I - i32.const 8 - global.get $builtins/I - i64.store - i32.const 8 - i32.const 8 - i64.load - i64.store - i32.const 8 - f32.load - global.set $builtins/f - i32.const 8 - global.get $builtins/f - f32.store - i32.const 8 - i32.const 8 - f32.load - f32.store - i32.const 8 - f64.load - global.set $builtins/F - i32.const 8 - global.get $builtins/F - f64.store - i32.const 8 - i32.const 8 - f64.load - f64.store - i32.const 8 - i32.load - global.set $builtins/i - i32.const 8 - global.get $builtins/i - i32.store - i32.const 8 - i32.const 8 - i32.load - i32.store - i32.const 8 - i64.load - global.set $builtins/I - i32.const 8 - global.get $builtins/I - i64.store - i32.const 8 - i32.const 8 - i64.load - i64.store - i32.const 8 - f32.load - global.set $builtins/f - i32.const 8 - global.get $builtins/f - f32.store - i32.const 8 - i32.const 8 - f32.load - f32.store - i32.const 8 - f64.load - global.set $builtins/F - i32.const 8 - global.get $builtins/F - f64.store - i32.const 8 - i32.const 8 - f64.load - f64.store - i32.const 8 - i32.load8_s - global.set $builtins/i - i32.const 8 - i32.load16_s - global.set $builtins/i - i32.const 8 - i32.load - global.set $builtins/i - i32.const 8 - i32.load8_u - global.set $builtins/i - i32.const 8 - i32.load16_u - global.set $builtins/i - i32.const 8 - i32.load - global.set $builtins/i - i32.const 8 - i32.load8_u - drop - i32.const 8 - i32.load16_u - drop - i32.const 8 - i32.load - drop - i32.const 8 - i32.load8_s - drop - i32.const 8 - i32.load16_s - drop - i32.const 8 - i32.load - drop - i32.const 8 - i64.load8_s - global.set $builtins/I - i32.const 8 - i64.load16_s - global.set $builtins/I - i32.const 8 - i64.load32_s - global.set $builtins/I - i32.const 8 - i64.load - global.set $builtins/I - i32.const 8 - i64.load8_u - drop - i32.const 8 - i64.load16_u - drop - i32.const 8 - i64.load32_u - drop - i32.const 8 - i64.load - drop - i32.const 8 - i32.const 1 - i32.store8 - i32.const 8 - i32.const 1 - i32.store16 - i32.const 8 - i32.const 1 - i32.store - i32.const 8 - i64.const 1 - i64.store8 - i32.const 8 - i64.const 1 - i64.store16 - i32.const 8 - i64.const 1 - i64.store32 - i32.const 8 - i64.const 1 - i64.store - i32.const 8 - i64.const 1 - i64.store - i32.const 1067450368 - global.set $builtins/i - f32.const 3.5032461608120427e-44 - global.set $builtins/f - i64.const 4608308318706860032 - global.set $builtins/I - f64.const 1.24e-322 - global.set $builtins/F - memory.size - drop - i32.const 1 - memory.grow - drop - memory.size - drop - i32.const 1 - memory.grow - drop - i32.const 10 - global.set $builtins/i - i64.const 200 - global.set $builtins/I - f32.const 1.25 - global.set $builtins/f - f64.const 25 - global.set $builtins/F - i32.const 1 - i32.const 2 - i32.const 1136 - i32.load - call_indirect (type $i32_i32_=>_i32) - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 265 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - i32.const 3 - i32.const 1136 - i32.load - call_indirect (type $i32_i32_=>_i32) - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 266 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1040 - i32.const 1040 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 267 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1168 - i32.const 1168 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 270 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 8 - i32.load8_s - drop - i32.const 8 - i32.load8_u - drop - i32.const 8 - i32.load16_s - drop - i32.const 8 - i32.load16_u - drop - i32.const 8 - i32.load - drop - i32.const 8 - i64.load8_s - drop - i32.const 8 - i64.load8_u - drop - i32.const 8 - i64.load16_s - drop - i32.const 8 - i64.load16_u - drop - i32.const 8 - i64.load32_s - drop - i32.const 8 - i64.load32_u - drop - i32.const 8 - i64.load - drop - i32.const 8 - f32.load - drop - i32.const 8 - f64.load - drop - i32.const 8 - i32.const 1 - i32.store8 - i32.const 8 - i32.const 1 - i32.store16 - i32.const 8 - i32.const 1 - i32.store - i32.const 8 - i64.const 1 - i64.store8 - i32.const 8 - i64.const 1 - i64.store16 - i32.const 8 - i64.const 1 - i64.store32 - i32.const 8 - i64.const 1 - i64.store - i32.const 8 - f32.const 1 - f32.store - i32.const 8 - f64.const 1 - f64.store - i32.const 0 - call $~lib/atomics/Atomics.isLockFree - if - i32.const 0 - i32.const 1088 - i32.const 432 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $~lib/atomics/Atomics.isLockFree - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 433 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $~lib/atomics/Atomics.isLockFree - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 434 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 3 - call $~lib/atomics/Atomics.isLockFree - if - i32.const 0 - i32.const 1088 - i32.const 435 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 4 - call $~lib/atomics/Atomics.isLockFree - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1088 - i32.const 436 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 5 - call $~lib/atomics/Atomics.isLockFree - if - i32.const 0 - i32.const 1088 - i32.const 437 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 8 - call $~lib/atomics/Atomics.isLockFree - if - i32.const 0 - i32.const 1088 - i32.const 438 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1248 - i32.const 5 - f64.const 0 - f64.const 0 - f64.const 25 - f64.const 26 - f64.const 26 - call $~lib/builtins/trace - i32.const 1328 - i32.const 1328 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 455 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1328 - i32.const 1328 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 456 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1360 - i32.const 1360 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 457 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1392 - i32.const 1392 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 458 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1424 - i32.const 1424 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 459 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1456 - i32.const 1456 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 460 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1488 - i32.const 1488 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 461 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1520 - i32.const 1520 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 462 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1552 - i32.const 1552 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 463 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1584 - i32.const 1584 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 464 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1616 - i32.const 1616 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 465 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1648 - i32.const 1648 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 466 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1680 - i32.const 1680 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 467 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1712 - i32.const 1712 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 468 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1744 - i32.const 1744 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 469 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1776 - i32.const 1776 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 470 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1808 - i32.const 1808 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 471 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1840 - i32.const 1840 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 472 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1392 - i32.const 1392 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 473 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1328 - i32.const 1328 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1088 - i32.const 474 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - ) (func $~start - call $start:builtins + i32.const 0 + i32.const 1088 + i32.const 67 + i32.const 20 + call $~lib/builtins/abort + unreachable ) ) diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index 9573100c47..8211d94a4f 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -107,7 +107,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -463,7 +463,7 @@ i32.const -42 local.tee $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $1 local.get $0 i32.add @@ -508,7 +508,7 @@ i32.const -42 local.tee $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $1 local.get $0 i32.add @@ -589,7 +589,7 @@ i64.const -42 local.tee $2 i64.const 63 - i64.shr_s + i64.shr_u local.tee $3 local.get $2 i64.add @@ -616,7 +616,7 @@ i64.const -42 local.tee $2 i64.const 63 - i64.shr_s + i64.shr_u local.tee $3 local.get $2 i64.add @@ -1440,9 +1440,17 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 324 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/builtins/i8.MAX_VALUE i32.const 127 i32.eq @@ -1452,9 +1460,17 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 326 + i32.const 1 + call $~lib/builtins/abort + unreachable + end global.get $~lib/builtins/i16.MAX_VALUE i32.const 32767 i32.eq diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 1013cc11c3..bad2229b08 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -54,7 +54,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index ebf78de487..7979c0ef46 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -39,7 +39,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/class-implements.optimized.wat b/tests/compiler/class-implements.optimized.wat index 28eafbd5a4..fba04e57e2 100644 --- a/tests/compiler/class-implements.optimized.wat +++ b/tests/compiler/class-implements.optimized.wat @@ -41,7 +41,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/class-implements.untouched.wat b/tests/compiler/class-implements.untouched.wat index b7ab1b4de0..fc36ea6c9a 100644 --- a/tests/compiler/class-implements.untouched.wat +++ b/tests/compiler/class-implements.untouched.wat @@ -48,7 +48,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index 9f337184e4..5c21fae2a7 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -51,7 +51,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 @@ -111,7 +111,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/class-overloading.untouched.wat b/tests/compiler/class-overloading.untouched.wat index ff606fff0b..cf203f6f89 100644 --- a/tests/compiler/class-overloading.untouched.wat +++ b/tests/compiler/class-overloading.untouched.wat @@ -55,7 +55,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -186,7 +186,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 2b4cd885ea..c0a0d4da14 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -77,7 +77,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index e0c7e9799a..43ef13a19d 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -154,7 +154,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -480,7 +480,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 diff --git a/tests/compiler/const-folding.optimized.wat b/tests/compiler/const-folding.optimized.wat index 14b4c71317..22d5595a45 100644 --- a/tests/compiler/const-folding.optimized.wat +++ b/tests/compiler/const-folding.optimized.wat @@ -9,7 +9,7 @@ i64.shl local.get $0 i64.const 63 - i64.shr_u + i64.shr_s i64.add ) ) diff --git a/tests/compiler/const-folding.untouched.wat b/tests/compiler/const-folding.untouched.wat index 251ac9f6a8..d881c08318 100644 --- a/tests/compiler/const-folding.untouched.wat +++ b/tests/compiler/const-folding.untouched.wat @@ -32,7 +32,7 @@ local.get $4 local.get $0 i64.const 63 - i64.shr_u + i64.shr_s local.get $1 i64.and i64.or diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index bde23d72a2..f439f0a27c 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -51,7 +51,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index a733d1484f..0bd1a317f7 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -47,7 +47,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 565621a65f..fd0b61ca02 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -150,7 +150,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -161,7 +161,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -451,7 +451,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -462,7 +462,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -846,7 +846,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index eacfebc0d4..70f7c60471 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -503,7 +503,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -515,7 +515,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -889,7 +889,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -901,7 +901,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1214,7 +1214,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1378,7 +1378,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1408,7 +1408,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1598,7 +1598,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index d935ff06e9..d071443a1a 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -88,7 +88,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 642deb6a97..1e59ed7c38 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -97,7 +97,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/exportstar-rereexport.optimized.wat b/tests/compiler/exportstar-rereexport.optimized.wat index 606338749d..7bc738b532 100644 --- a/tests/compiler/exportstar-rereexport.optimized.wat +++ b/tests/compiler/exportstar-rereexport.optimized.wat @@ -68,7 +68,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $3 local.get $2 diff --git a/tests/compiler/exportstar-rereexport.untouched.wat b/tests/compiler/exportstar-rereexport.untouched.wat index 57c3341551..2abb4ad2d8 100644 --- a/tests/compiler/exportstar-rereexport.untouched.wat +++ b/tests/compiler/exportstar-rereexport.untouched.wat @@ -78,7 +78,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index a67611b82c..d6c8b980b7 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -75,7 +75,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -86,7 +86,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -376,7 +376,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -387,7 +387,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -703,7 +703,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -730,7 +730,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -963,7 +963,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1612,7 +1612,7 @@ i32.load local.tee $3 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $0 diff --git a/tests/compiler/extends-baseaggregate.untouched.wat b/tests/compiler/extends-baseaggregate.untouched.wat index 664c7a63fa..42f572bd17 100644 --- a/tests/compiler/extends-baseaggregate.untouched.wat +++ b/tests/compiler/extends-baseaggregate.untouched.wat @@ -100,7 +100,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -112,7 +112,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -486,7 +486,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -498,7 +498,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -811,7 +811,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -975,7 +975,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1005,7 +1005,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1195,7 +1195,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1874,7 +1874,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1890,7 +1890,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1906,7 +1906,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1922,7 +1922,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1995,7 +1995,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2011,7 +2011,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2027,7 +2027,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2043,7 +2043,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2102,7 +2102,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2118,7 +2118,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2134,7 +2134,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2150,7 +2150,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -3232,13 +3232,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 288 diff --git a/tests/compiler/extends-recursive.untouched.wat b/tests/compiler/extends-recursive.untouched.wat index 06d2040bd3..102eeab2a2 100644 --- a/tests/compiler/extends-recursive.untouched.wat +++ b/tests/compiler/extends-recursive.untouched.wat @@ -41,7 +41,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/field-initialization.optimized.wat b/tests/compiler/field-initialization.optimized.wat index 6f20599bb8..feb896e8fe 100644 --- a/tests/compiler/field-initialization.optimized.wat +++ b/tests/compiler/field-initialization.optimized.wat @@ -64,7 +64,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 @@ -141,7 +141,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/field-initialization.untouched.wat b/tests/compiler/field-initialization.untouched.wat index 0517dcbf9c..f7b219d53a 100644 --- a/tests/compiler/field-initialization.untouched.wat +++ b/tests/compiler/field-initialization.untouched.wat @@ -49,7 +49,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -704,7 +704,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 8680bc669c..ae73a59a06 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -147,7 +147,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -158,7 +158,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -448,7 +448,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -459,7 +459,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -843,7 +843,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 3ea1d01e04..e161208601 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -516,7 +516,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -528,7 +528,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -902,7 +902,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -914,7 +914,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1227,7 +1227,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1391,7 +1391,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1421,7 +1421,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1611,7 +1611,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/function-call.optimized.wat b/tests/compiler/function-call.optimized.wat index b83d0ceef2..3f3af47c25 100644 --- a/tests/compiler/function-call.optimized.wat +++ b/tests/compiler/function-call.optimized.wat @@ -108,7 +108,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $0 local.get $1 local.get $0 diff --git a/tests/compiler/function-call.untouched.wat b/tests/compiler/function-call.untouched.wat index 9c92a36153..a3ecc55d1e 100644 --- a/tests/compiler/function-call.untouched.wat +++ b/tests/compiler/function-call.untouched.wat @@ -75,7 +75,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 9384556cdd..5c53e6a7ba 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -244,7 +244,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $0 local.get $1 local.get $0 diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index c59cfba85b..fe431b4ac0 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -253,7 +253,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index e809d8a045..203090482a 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -40,7 +40,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $1 local.get $2 local.get $1 diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 9397fc74a6..1786321fbf 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -41,7 +41,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 9c33c3adf4..de5a3eeda9 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -82,7 +82,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -93,7 +93,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -383,7 +383,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -394,7 +394,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -686,7 +686,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -713,7 +713,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -965,7 +965,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 diff --git a/tests/compiler/implicit-getter-setter.untouched.wat b/tests/compiler/implicit-getter-setter.untouched.wat index 906a0165ec..26a89e87f0 100644 --- a/tests/compiler/implicit-getter-setter.untouched.wat +++ b/tests/compiler/implicit-getter-setter.untouched.wat @@ -104,7 +104,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -116,7 +116,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -490,7 +490,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -502,7 +502,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -815,7 +815,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -979,7 +979,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1009,7 +1009,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1199,7 +1199,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index ebe9642e9f..b1a39c4109 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -74,7 +74,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/infer-array.untouched.wat b/tests/compiler/infer-array.untouched.wat index 6ee473ce24..cfe2e7fc0d 100644 --- a/tests/compiler/infer-array.untouched.wat +++ b/tests/compiler/infer-array.untouched.wat @@ -61,7 +61,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -408,7 +408,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -424,7 +424,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -440,7 +440,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -456,7 +456,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -529,7 +529,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -545,7 +545,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -561,7 +561,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -577,7 +577,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -636,7 +636,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -652,7 +652,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -668,7 +668,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -684,7 +684,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 40b5a9b781..b401270ea2 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -66,7 +66,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 50202075bc..31ec407ce8 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -247,7 +247,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index e1d5c7c1c4..933be51a84 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -39,7 +39,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/instanceof-class.untouched.wat b/tests/compiler/instanceof-class.untouched.wat index 67f434a05b..6f98a66b04 100644 --- a/tests/compiler/instanceof-class.untouched.wat +++ b/tests/compiler/instanceof-class.untouched.wat @@ -43,7 +43,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 4913000374..9ff060e37c 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -67,7 +67,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -78,7 +78,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -368,7 +368,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -379,7 +379,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -763,7 +763,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/issues/1095.untouched.wat b/tests/compiler/issues/1095.untouched.wat index 63f4eb361c..432f4ccb48 100644 --- a/tests/compiler/issues/1095.untouched.wat +++ b/tests/compiler/issues/1095.untouched.wat @@ -91,7 +91,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -103,7 +103,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -477,7 +477,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -489,7 +489,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -802,7 +802,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -966,7 +966,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -996,7 +996,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1186,7 +1186,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/issues/1225.optimized.wat b/tests/compiler/issues/1225.optimized.wat index 717e09b3a0..2413ed8337 100644 --- a/tests/compiler/issues/1225.optimized.wat +++ b/tests/compiler/issues/1225.optimized.wat @@ -68,7 +68,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -79,7 +79,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -369,7 +369,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -380,7 +380,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -764,7 +764,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/issues/1225.untouched.wat b/tests/compiler/issues/1225.untouched.wat index ee99447b69..ac3376bb56 100644 --- a/tests/compiler/issues/1225.untouched.wat +++ b/tests/compiler/issues/1225.untouched.wat @@ -92,7 +92,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -104,7 +104,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -478,7 +478,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -490,7 +490,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -803,7 +803,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -967,7 +967,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -997,7 +997,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1187,7 +1187,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index ce3a0a2d5d..ca27ec7a3f 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -65,7 +65,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -76,7 +76,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -366,7 +366,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -377,7 +377,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -761,7 +761,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index 5ce7daa94c..58be2776f0 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -114,7 +114,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -126,7 +126,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -500,7 +500,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -512,7 +512,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -825,7 +825,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -989,7 +989,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1019,7 +1019,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1209,7 +1209,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index ba0ca816f5..88aa757c48 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -70,7 +70,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -81,7 +81,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -371,7 +371,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -382,7 +382,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -765,7 +765,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $2 local.get $3 diff --git a/tests/compiler/managed-cast.untouched.wat b/tests/compiler/managed-cast.untouched.wat index 5f6f58c1b2..6a45af405f 100644 --- a/tests/compiler/managed-cast.untouched.wat +++ b/tests/compiler/managed-cast.untouched.wat @@ -94,7 +94,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -106,7 +106,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -480,7 +480,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -492,7 +492,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -805,7 +805,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -969,7 +969,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -999,7 +999,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1189,7 +1189,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/many-locals.optimized.wat b/tests/compiler/many-locals.optimized.wat index 4c9f7826dd..1899b062f7 100644 --- a/tests/compiler/many-locals.optimized.wat +++ b/tests/compiler/many-locals.optimized.wat @@ -17,7 +17,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u ) (func $~start i32.const 42 diff --git a/tests/compiler/many-locals.untouched.wat b/tests/compiler/many-locals.untouched.wat index 8e2517e717..83b66c5631 100644 --- a/tests/compiler/many-locals.untouched.wat +++ b/tests/compiler/many-locals.untouched.wat @@ -786,7 +786,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u ) (func $start:many-locals i32.const 42 diff --git a/tests/compiler/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index c55ff71226..639aac6503 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -216,13 +216,13 @@ i32.shl local.get $6 i32.const 24 - i32.shr_u + i32.shr_s i32.or i32.store local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $1 i32.load offset=5 local.tee $3 @@ -233,7 +233,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $1 i32.load offset=9 local.tee $3 @@ -249,7 +249,7 @@ i32.shl local.get $3 i32.const 24 - i32.shr_u + i32.shr_s i32.or i32.store offset=12 local.get $1 @@ -307,13 +307,13 @@ i32.shl local.get $6 i32.const 16 - i32.shr_u + i32.shr_s i32.or i32.store local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $1 i32.load offset=6 local.tee $3 @@ -324,7 +324,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $1 i32.load offset=10 local.tee $3 @@ -340,7 +340,7 @@ i32.shl local.get $3 i32.const 16 - i32.shr_u + i32.shr_s i32.or i32.store offset=12 local.get $1 @@ -394,13 +394,13 @@ i32.shl local.get $6 i32.const 8 - i32.shr_u + i32.shr_s i32.or i32.store local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $1 i32.load offset=7 local.tee $3 @@ -411,7 +411,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $1 i32.load offset=11 local.tee $3 @@ -427,7 +427,7 @@ i32.shl local.get $3 i32.const 8 - i32.shr_u + i32.shr_s i32.or i32.store offset=12 local.get $1 diff --git a/tests/compiler/memcpy.untouched.wat b/tests/compiler/memcpy.untouched.wat index 73835e9b4b..8e02fcb182 100644 --- a/tests/compiler/memcpy.untouched.wat +++ b/tests/compiler/memcpy.untouched.wat @@ -279,7 +279,7 @@ local.get $0 local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $5 i32.const 8 i32.shl @@ -295,7 +295,7 @@ i32.add local.get $5 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -311,7 +311,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $5 i32.const 8 i32.shl @@ -327,7 +327,7 @@ i32.add local.get $5 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -400,7 +400,7 @@ local.get $0 local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $5 i32.const 16 i32.shl @@ -416,7 +416,7 @@ i32.add local.get $5 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -432,7 +432,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $5 i32.const 16 i32.shl @@ -448,7 +448,7 @@ i32.add local.get $5 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -507,7 +507,7 @@ local.get $0 local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $5 i32.const 24 i32.shl @@ -523,7 +523,7 @@ i32.add local.get $5 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -539,7 +539,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $5 i32.const 24 i32.shl @@ -555,7 +555,7 @@ i32.add local.get $5 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index dc79afe700..3f4eda1264 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -33,7 +33,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $3 local.get $2 diff --git a/tests/compiler/new.untouched.wat b/tests/compiler/new.untouched.wat index a43342cf59..312cc0f5de 100644 --- a/tests/compiler/new.untouched.wat +++ b/tests/compiler/new.untouched.wat @@ -39,7 +39,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 6d8c3d16e2..b11b72c29e 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -127,7 +127,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 @@ -200,7 +200,7 @@ if (result i32) local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $1 if i32.const 0 @@ -237,7 +237,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -376,7 +376,7 @@ local.get $3 local.get $10 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -623,7 +623,7 @@ i64.mul local.tee $3 local.get $1 - i64.shr_u + i64.shr_s local.tee $7 local.get $6 i64.extend_i32_s @@ -1165,34 +1165,34 @@ global.get $~lib/util/number/_frc_pow local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s local.set $3 local.get $2 i64.const 4294967295 i64.and local.tee $2 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul local.get $2 i64.const 10 i64.shl i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $1 local.get $0 local.get $0 local.get $3 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul local.get $2 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul i64.const 0 i64.add local.tee $5 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $5 i64.const 4294967295 @@ -1209,11 +1209,11 @@ i32.const 2 i32.add local.get $3 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $1 i64.const 4294967295 @@ -1225,7 +1225,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.sub @@ -1244,11 +1244,11 @@ i64.const 4294966784 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $1 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $3 i64.const 4294966784 @@ -1260,7 +1260,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.add diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 19adb60dc9..5ac89310e6 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -146,7 +146,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -399,7 +399,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -544,7 +544,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -627,7 +627,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $2 if @@ -677,7 +677,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -751,7 +751,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -994,7 +994,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $11 local.get $3 @@ -1315,7 +1315,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s local.set $22 local.get $22 local.get $14 @@ -1716,7 +1716,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1732,7 +1732,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1748,7 +1748,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1764,7 +1764,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1837,7 +1837,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1853,7 +1853,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -1869,7 +1869,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1885,7 +1885,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -1944,7 +1944,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -1960,7 +1960,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -1976,7 +1976,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -1992,7 +1992,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -3084,7 +3084,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $7 local.get $6 @@ -3183,7 +3183,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $14 @@ -3238,11 +3238,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -3253,7 +3253,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -3270,11 +3270,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $24 i64.const 32 - i64.shr_u + i64.shr_s local.set $24 local.get $20 local.get $21 @@ -3308,11 +3308,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $23 local.get $22 @@ -3323,7 +3323,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $18 local.get $23 @@ -3340,11 +3340,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_u + i64.shr_s local.set $18 local.get $25 i64.const 32 - i64.shr_u + i64.shr_s local.set $25 local.get $21 local.get $20 @@ -3380,11 +3380,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -3395,7 +3395,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -3412,11 +3412,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $27 i64.const 32 - i64.shr_u + i64.shr_s local.set $27 local.get $20 local.get $21 diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 42a5e9eaa8..a7ffc1235e 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -74,7 +74,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -85,7 +85,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -375,7 +375,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -386,7 +386,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -678,7 +678,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -705,7 +705,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -957,7 +957,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1110,7 +1110,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 770147500f..59e4c42b09 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -98,7 +98,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -110,7 +110,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -484,7 +484,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -496,7 +496,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -809,7 +809,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -973,7 +973,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1003,7 +1003,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1193,7 +1193,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1563,7 +1563,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -2061,7 +2061,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2077,7 +2077,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2093,7 +2093,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2109,7 +2109,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2182,7 +2182,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2198,7 +2198,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2214,7 +2214,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2230,7 +2230,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2289,7 +2289,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2305,7 +2305,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2321,7 +2321,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2337,7 +2337,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 560fcc8178..e1aa7c2d1b 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -33,7 +33,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $3 local.get $2 diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 0e4f058695..277649f998 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -46,7 +46,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/overflow.optimized.wat b/tests/compiler/overflow.optimized.wat index 2f847eda83..f91c8b53f3 100644 --- a/tests/compiler/overflow.optimized.wat +++ b/tests/compiler/overflow.optimized.wat @@ -1,5 +1,17 @@ (module + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\16\00\00\00\01\00\00\00\01\00\00\00\16\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") (export "memory" (memory $0)) + (start $~start) + (func $~start + i32.const 0 + i32.const 1040 + i32.const 10 + i32.const 3 + call $~lib/builtins/abort + unreachable + ) ) diff --git a/tests/compiler/overflow.untouched.wat b/tests/compiler/overflow.untouched.wat index 4b9a74b4cb..441e9ab809 100644 --- a/tests/compiler/overflow.untouched.wat +++ b/tests/compiler/overflow.untouched.wat @@ -21,7 +21,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const -128 i32.eq i32.eqz @@ -41,7 +41,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 127 i32.eq i32.eqz @@ -64,7 +64,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const -128 i32.eq i32.eqz @@ -87,7 +87,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 127 i32.eq i32.eqz @@ -107,7 +107,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const -128 i32.eq i32.eqz @@ -127,7 +127,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 127 i32.eq i32.eqz @@ -148,7 +148,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const -128 i32.eq i32.eqz @@ -169,7 +169,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 127 i32.eq i32.eqz @@ -187,7 +187,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const -128 i32.eq i32.eqz @@ -209,7 +209,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -32768 i32.eq i32.eqz @@ -229,7 +229,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 32767 i32.eq i32.eqz @@ -252,7 +252,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -32768 i32.eq i32.eqz @@ -275,7 +275,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 32767 i32.eq i32.eqz @@ -295,7 +295,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -32768 i32.eq i32.eqz @@ -315,7 +315,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 32767 i32.eq i32.eqz @@ -336,7 +336,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -32768 i32.eq i32.eqz @@ -357,7 +357,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 32767 i32.eq i32.eqz @@ -375,7 +375,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -32768 i32.eq i32.eqz diff --git a/tests/compiler/portable-conversions.untouched.wat b/tests/compiler/portable-conversions.untouched.wat index 6d00acc97a..1a3dbd99c2 100644 --- a/tests/compiler/portable-conversions.untouched.wat +++ b/tests/compiler/portable-conversions.untouched.wat @@ -16,7 +16,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eqz if i32.const 0 @@ -31,7 +31,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eqz if i32.const 0 @@ -46,7 +46,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eqz if i32.const 0 @@ -61,7 +61,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eqz if i32.const 0 @@ -75,7 +75,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eqz if i32.const 0 @@ -90,7 +90,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eqz if i32.const 0 @@ -105,7 +105,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eqz if i32.const 0 @@ -120,7 +120,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eqz if i32.const 0 diff --git a/tests/compiler/rc/global-init.untouched.wat b/tests/compiler/rc/global-init.untouched.wat index bcb9c93bde..f869684d4a 100644 --- a/tests/compiler/rc/global-init.untouched.wat +++ b/tests/compiler/rc/global-init.untouched.wat @@ -201,7 +201,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -213,7 +213,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -587,7 +587,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -599,7 +599,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index a3e22c6a0e..f5fd6e2105 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -65,7 +65,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -76,7 +76,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -366,7 +366,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -377,7 +377,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -761,7 +761,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/rc/local-init.untouched.wat b/tests/compiler/rc/local-init.untouched.wat index 05fbb2d944..c439fc4f07 100644 --- a/tests/compiler/rc/local-init.untouched.wat +++ b/tests/compiler/rc/local-init.untouched.wat @@ -103,7 +103,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -115,7 +115,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -489,7 +489,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -501,7 +501,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -814,7 +814,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -978,7 +978,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1008,7 +1008,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1198,7 +1198,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index ed8cf871e1..b577148d99 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -65,7 +65,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -76,7 +76,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -366,7 +366,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -377,7 +377,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -761,7 +761,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/rc/logical-and-mismatch.untouched.wat b/tests/compiler/rc/logical-and-mismatch.untouched.wat index 8bc73c87c9..c038ce1f5f 100644 --- a/tests/compiler/rc/logical-and-mismatch.untouched.wat +++ b/tests/compiler/rc/logical-and-mismatch.untouched.wat @@ -89,7 +89,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -101,7 +101,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -475,7 +475,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -487,7 +487,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -800,7 +800,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -964,7 +964,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -994,7 +994,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1184,7 +1184,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 28dd6e3978..1990fceb4d 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -65,7 +65,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -76,7 +76,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -366,7 +366,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -377,7 +377,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -761,7 +761,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/rc/logical-or-mismatch.untouched.wat b/tests/compiler/rc/logical-or-mismatch.untouched.wat index 16b203f1d7..7b5643728a 100644 --- a/tests/compiler/rc/logical-or-mismatch.untouched.wat +++ b/tests/compiler/rc/logical-or-mismatch.untouched.wat @@ -89,7 +89,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -101,7 +101,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -475,7 +475,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -487,7 +487,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -800,7 +800,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -964,7 +964,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -994,7 +994,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1184,7 +1184,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 995319d8fa..24514d4c6e 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -155,7 +155,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -166,7 +166,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -456,7 +456,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -467,7 +467,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -851,7 +851,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/rc/optimize.untouched.wat b/tests/compiler/rc/optimize.untouched.wat index a7367ce91f..976f64ba79 100644 --- a/tests/compiler/rc/optimize.untouched.wat +++ b/tests/compiler/rc/optimize.untouched.wat @@ -192,7 +192,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -204,7 +204,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -578,7 +578,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -590,7 +590,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -903,7 +903,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1067,7 +1067,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1097,7 +1097,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1287,7 +1287,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 1082f8c402..9f867dcaa7 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -68,7 +68,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -79,7 +79,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -369,7 +369,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -380,7 +380,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -672,7 +672,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -699,7 +699,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -951,7 +951,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 diff --git a/tests/compiler/rc/rereturn.untouched.wat b/tests/compiler/rc/rereturn.untouched.wat index 46ec808478..5500bca8b6 100644 --- a/tests/compiler/rc/rereturn.untouched.wat +++ b/tests/compiler/rc/rereturn.untouched.wat @@ -91,7 +91,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -103,7 +103,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -477,7 +477,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -489,7 +489,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -802,7 +802,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -966,7 +966,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -996,7 +996,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1186,7 +1186,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index e2dcc99097..7acd3d8ef2 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -67,7 +67,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -78,7 +78,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -368,7 +368,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -379,7 +379,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -763,7 +763,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/rc/ternary-mismatch.untouched.wat b/tests/compiler/rc/ternary-mismatch.untouched.wat index 6dffb7d72d..d0ecabd473 100644 --- a/tests/compiler/rc/ternary-mismatch.untouched.wat +++ b/tests/compiler/rc/ternary-mismatch.untouched.wat @@ -91,7 +91,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -103,7 +103,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -477,7 +477,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -489,7 +489,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -802,7 +802,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -966,7 +966,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -996,7 +996,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1186,7 +1186,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index 502c3cd9f8..cf78b55571 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -122,7 +122,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/reexport.untouched.wat b/tests/compiler/reexport.untouched.wat index 5c277543ef..6db5c821e9 100644 --- a/tests/compiler/reexport.untouched.wat +++ b/tests/compiler/reexport.untouched.wat @@ -128,7 +128,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index 606338749d..7bc738b532 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -68,7 +68,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $3 local.get $2 diff --git a/tests/compiler/rereexport.untouched.wat b/tests/compiler/rereexport.untouched.wat index 97762fb368..dfda1a44ed 100644 --- a/tests/compiler/rereexport.untouched.wat +++ b/tests/compiler/rereexport.untouched.wat @@ -78,7 +78,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 49a4bab338..8cea687c7b 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -68,7 +68,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/resolve-access.untouched.wat b/tests/compiler/resolve-access.untouched.wat index 9de1f9f8f9..4b3fcc5835 100644 --- a/tests/compiler/resolve-access.untouched.wat +++ b/tests/compiler/resolve-access.untouched.wat @@ -61,7 +61,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -408,7 +408,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -424,7 +424,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -440,7 +440,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -456,7 +456,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -529,7 +529,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -545,7 +545,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -561,7 +561,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -577,7 +577,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -636,7 +636,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -652,7 +652,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -668,7 +668,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -684,7 +684,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -1885,7 +1885,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -2030,7 +2030,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -2184,7 +2184,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $4 @@ -2364,7 +2364,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $3 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 81ca43caa9..22d6babd96 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -59,7 +59,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -257,7 +257,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 @@ -330,7 +330,7 @@ if (result i32) local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $1 if i32.const 0 @@ -391,7 +391,7 @@ local.get $3 local.get $10 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -638,7 +638,7 @@ i64.mul local.tee $3 local.get $1 - i64.shr_u + i64.shr_s local.tee $7 local.get $6 i64.extend_i32_s @@ -1179,34 +1179,34 @@ global.get $~lib/util/number/_frc_pow local.tee $1 i64.const 32 - i64.shr_u + i64.shr_s local.set $3 local.get $1 i64.const 4294967295 i64.and local.tee $1 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul local.get $1 i64.const 10 i64.shl i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $2 local.get $0 local.get $0 local.get $3 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul local.get $1 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul i64.const 0 i64.add local.tee $4 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $4 i64.const 4294967295 @@ -1223,11 +1223,11 @@ i32.const 3 i32.add local.get $3 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul local.get $2 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $2 i64.const 4294967295 @@ -1239,7 +1239,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.sub @@ -1258,11 +1258,11 @@ i64.const 4294966784 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $3 i64.const 4294966784 @@ -1274,7 +1274,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.add @@ -1653,7 +1653,7 @@ end global.get $resolve-binary/a i32.const 1 - i32.shr_s + i32.shr_u global.set $resolve-binary/a global.get $resolve-binary/a call $~lib/number/I32#toString @@ -1670,7 +1670,7 @@ end global.get $resolve-binary/a i32.const 1 - i32.shr_u + i32.shr_s global.set $resolve-binary/a global.get $resolve-binary/a call $~lib/number/I32#toString @@ -1821,7 +1821,7 @@ local.set $2 local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -1893,7 +1893,7 @@ call $~lib/builtins/abort unreachable end - i32.const 3 + i32.const -1 call $~lib/number/I32#toString i32.const 2768 call $~lib/string/String.__eq diff --git a/tests/compiler/resolve-binary.untouched.wat b/tests/compiler/resolve-binary.untouched.wat index 586dfd71b8..627880f15f 100644 --- a/tests/compiler/resolve-binary.untouched.wat +++ b/tests/compiler/resolve-binary.untouched.wat @@ -95,7 +95,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -377,7 +377,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -630,7 +630,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -775,7 +775,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -855,7 +855,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $2 if @@ -905,7 +905,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -1086,11 +1086,11 @@ local.set $6 local.get $5 i64.const 52 - i64.shr_u + i64.shr_s local.set $7 local.get $6 i64.const 52 - i64.shr_u + i64.shr_s local.set $8 local.get $7 i64.const 1 @@ -1177,7 +1177,7 @@ i64.lt_u local.get $6 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.eqz @@ -1209,7 +1209,7 @@ local.set $10 local.get $5 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 if (result i32) block $~lib/util/math/checkint|inlined.0 (result i32) @@ -1217,7 +1217,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $11 @@ -1279,7 +1279,7 @@ end local.get $6 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne if (result f64) @@ -1293,7 +1293,7 @@ end local.get $5 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne if @@ -1302,7 +1302,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $11 @@ -1453,14 +1453,14 @@ i64.const 52 i64.const 7 i64.sub - i64.shr_u + i64.shr_s i64.const 127 i64.and i32.wrap_i64 local.set $12 local.get $11 i64.const 52 - i64.shr_s + i64.shr_u local.set $13 local.get $9 local.get $11 @@ -1679,7 +1679,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2047 i32.and @@ -1708,7 +1708,7 @@ if local.get $9 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne if (result f64) @@ -1992,7 +1992,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $11 local.get $3 @@ -2313,7 +2313,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s local.set $22 local.get $22 local.get $14 @@ -2714,7 +2714,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2730,7 +2730,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2746,7 +2746,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2762,7 +2762,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2835,7 +2835,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2851,7 +2851,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2867,7 +2867,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2883,7 +2883,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2942,7 +2942,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2958,7 +2958,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2974,7 +2974,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2990,7 +2990,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -4082,7 +4082,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $7 local.get $6 @@ -4181,7 +4181,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $14 @@ -4236,11 +4236,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -4251,7 +4251,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -4268,11 +4268,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $24 i64.const 32 - i64.shr_u + i64.shr_s local.set $24 local.get $20 local.get $21 @@ -4306,11 +4306,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $23 local.get $22 @@ -4321,7 +4321,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $18 local.get $23 @@ -4338,11 +4338,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_u + i64.shr_s local.set $18 local.get $25 i64.const 32 - i64.shr_u + i64.shr_s local.set $25 local.get $21 local.get $20 @@ -4378,11 +4378,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -4393,7 +4393,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -4410,11 +4410,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $27 i64.const 32 - i64.shr_u + i64.shr_s local.set $27 local.get $20 local.get $21 @@ -4779,7 +4779,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -4797,7 +4797,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -4815,7 +4815,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -4833,7 +4833,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -4872,7 +4872,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -5427,7 +5427,7 @@ end global.get $resolve-binary/a i32.const 1 - i32.shr_s + i32.shr_u global.set $resolve-binary/a global.get $resolve-binary/a i32.const 10 @@ -5446,7 +5446,7 @@ end global.get $resolve-binary/a i32.const 1 - i32.shr_u + i32.shr_s global.set $resolve-binary/a global.get $resolve-binary/a i32.const 10 @@ -5675,7 +5675,7 @@ end i32.const 2 i32.const 1 - i32.shr_s + i32.shr_u i32.const 10 call $~lib/number/I32#toString local.tee $30 @@ -5692,7 +5692,7 @@ end i32.const -1 i32.const 30 - i32.shr_u + i32.shr_s i32.const 10 call $~lib/number/I32#toString local.tee $31 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index b36e1a3f7a..31e3072fc7 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -94,7 +94,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 @@ -312,7 +312,7 @@ i32.const 2 i32.const 1073741808 local.get $1 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 1040 @@ -350,7 +350,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1152 @@ -374,7 +374,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1152 @@ -463,7 +463,7 @@ local.get $3 local.get $11 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -710,7 +710,7 @@ i64.mul local.tee $3 local.get $13 - i64.shr_u + i64.shr_s local.tee $1 local.get $6 i64.extend_i32_s @@ -1366,7 +1366,7 @@ f64.ne i32.add i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.tee $4 @@ -1394,12 +1394,12 @@ local.set $2 local.get $6 i64.const 32 - i64.shr_u + i64.shr_s local.tee $6 global.get $~lib/util/number/_frc_plus local.tee $5 i64.const 32 - i64.shr_u + i64.shr_s local.tee $7 i64.mul local.get $2 @@ -1412,11 +1412,11 @@ local.tee $5 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $5 local.get $6 @@ -1428,7 +1428,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.sub @@ -1449,7 +1449,7 @@ i64.shl local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s local.tee $7 i64.mul local.get $2 @@ -1462,11 +1462,11 @@ local.tee $3 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $3 local.get $6 @@ -1478,7 +1478,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add global.get $~lib/util/number/_exp_pow local.tee $4 @@ -1499,7 +1499,7 @@ global.get $~lib/util/number/_frc_minus local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s local.tee $5 i64.mul local.get $2 @@ -1512,11 +1512,11 @@ local.tee $2 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $2 local.get $6 @@ -1528,7 +1528,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.add @@ -1548,7 +1548,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/resolve-elementaccess.untouched.wat b/tests/compiler/resolve-elementaccess.untouched.wat index cd750819a0..f125c7ce3b 100644 --- a/tests/compiler/resolve-elementaccess.untouched.wat +++ b/tests/compiler/resolve-elementaccess.untouched.wat @@ -88,7 +88,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -413,7 +413,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -481,7 +481,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 144 @@ -505,7 +505,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 144 @@ -620,7 +620,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $11 local.get $3 @@ -941,7 +941,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s local.set $22 local.get $22 local.get $14 @@ -1342,7 +1342,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1358,7 +1358,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1374,7 +1374,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1390,7 +1390,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1463,7 +1463,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1479,7 +1479,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -1495,7 +1495,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1511,7 +1511,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -1570,7 +1570,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -1586,7 +1586,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -1602,7 +1602,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -1618,7 +1618,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2850,7 +2850,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $7 local.get $6 @@ -2949,7 +2949,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $14 @@ -3004,11 +3004,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -3019,7 +3019,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -3036,11 +3036,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $24 i64.const 32 - i64.shr_u + i64.shr_s local.set $24 local.get $20 local.get $21 @@ -3074,11 +3074,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $23 local.get $22 @@ -3089,7 +3089,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $18 local.get $23 @@ -3106,11 +3106,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_u + i64.shr_s local.set $18 local.get $25 i64.const 32 - i64.shr_u + i64.shr_s local.set $25 local.get $21 local.get $20 @@ -3146,11 +3146,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -3161,7 +3161,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -3178,11 +3178,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $27 i64.const 32 - i64.shr_u + i64.shr_s local.set $27 local.get $20 local.get $21 @@ -3228,7 +3228,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -3756,7 +3756,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -3901,7 +3901,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -4017,7 +4017,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $3 diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index ee3dd5a1bf..5f5b1944b5 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -80,7 +80,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 @@ -132,7 +132,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $2 if i32.const 0 @@ -223,7 +223,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/resolve-function-expression.untouched.wat b/tests/compiler/resolve-function-expression.untouched.wat index 7384bbdc18..e2464dddd4 100644 --- a/tests/compiler/resolve-function-expression.untouched.wat +++ b/tests/compiler/resolve-function-expression.untouched.wat @@ -127,7 +127,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -380,7 +380,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -525,7 +525,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -608,7 +608,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $2 if @@ -658,7 +658,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -732,7 +732,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index e220e7e288..c39e8a281f 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -45,7 +45,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/resolve-nested.untouched.wat b/tests/compiler/resolve-nested.untouched.wat index c7af958501..2e50472f19 100644 --- a/tests/compiler/resolve-nested.untouched.wat +++ b/tests/compiler/resolve-nested.untouched.wat @@ -62,7 +62,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index b06a5f2b6d..60af963fad 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -32,7 +32,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $1 local.get $2 local.get $1 diff --git a/tests/compiler/resolve-new.untouched.wat b/tests/compiler/resolve-new.untouched.wat index 61f82a9dd5..dcb7b5f8cb 100644 --- a/tests/compiler/resolve-new.untouched.wat +++ b/tests/compiler/resolve-new.untouched.wat @@ -37,7 +37,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 07f6d62705..7e22a87a4f 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -72,7 +72,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 @@ -124,7 +124,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $2 if i32.const 0 @@ -216,7 +216,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/resolve-propertyaccess.untouched.wat b/tests/compiler/resolve-propertyaccess.untouched.wat index 857ac723a0..f6be08e382 100644 --- a/tests/compiler/resolve-propertyaccess.untouched.wat +++ b/tests/compiler/resolve-propertyaccess.untouched.wat @@ -128,7 +128,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -381,7 +381,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -526,7 +526,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -609,7 +609,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $2 if @@ -659,7 +659,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -733,7 +733,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 86bb1d91ff..8a022150d8 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -94,7 +94,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -105,7 +105,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -395,7 +395,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -406,7 +406,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -698,7 +698,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -725,7 +725,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -977,7 +977,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1195,7 +1195,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1366,7 +1366,7 @@ local.get $3 local.get $10 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -1613,7 +1613,7 @@ i64.mul local.tee $3 local.get $1 - i64.shr_u + i64.shr_s local.tee $7 local.get $6 i64.extend_i32_s @@ -2155,34 +2155,34 @@ global.get $~lib/util/number/_frc_pow local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s local.set $3 local.get $2 i64.const 4294967295 i64.and local.tee $2 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul local.get $2 i64.const 10 i64.shl i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $1 local.get $0 local.get $0 local.get $3 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul local.get $2 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul i64.const 0 i64.add local.tee $5 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $5 i64.const 4294967295 @@ -2199,11 +2199,11 @@ i32.const 1 i32.add local.get $3 - i64.const 31 - i64.shl + i64.const -2147483648 + i64.mul local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $1 i64.const 4294967295 @@ -2215,7 +2215,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.sub @@ -2234,11 +2234,11 @@ i64.const 4294966784 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $1 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $3 i64.const 4294966784 @@ -2250,7 +2250,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.add diff --git a/tests/compiler/resolve-ternary.untouched.wat b/tests/compiler/resolve-ternary.untouched.wat index 6ad2258385..51e78680ee 100644 --- a/tests/compiler/resolve-ternary.untouched.wat +++ b/tests/compiler/resolve-ternary.untouched.wat @@ -132,7 +132,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -144,7 +144,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -518,7 +518,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -530,7 +530,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -843,7 +843,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1007,7 +1007,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1037,7 +1037,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1227,7 +1227,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1794,7 +1794,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -1939,7 +1939,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -2019,7 +2019,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $2 if @@ -2069,7 +2069,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -2140,7 +2140,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -2383,7 +2383,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $11 local.get $3 @@ -2704,7 +2704,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s local.set $22 local.get $22 local.get $14 @@ -3105,7 +3105,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -3121,7 +3121,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -3137,7 +3137,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -3153,7 +3153,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -3226,7 +3226,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -3242,7 +3242,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -3258,7 +3258,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -3274,7 +3274,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -3333,7 +3333,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -3349,7 +3349,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -3365,7 +3365,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -3381,7 +3381,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -4473,7 +4473,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $7 local.get $6 @@ -4572,7 +4572,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $14 @@ -4627,11 +4627,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -4642,7 +4642,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -4659,11 +4659,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $24 i64.const 32 - i64.shr_u + i64.shr_s local.set $24 local.get $20 local.get $21 @@ -4697,11 +4697,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $23 local.get $22 @@ -4712,7 +4712,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $18 local.get $23 @@ -4729,11 +4729,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_u + i64.shr_s local.set $18 local.get $25 i64.const 32 - i64.shr_u + i64.shr_s local.set $25 local.get $21 local.get $20 @@ -4769,11 +4769,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -4784,7 +4784,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -4801,11 +4801,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $27 i64.const 32 - i64.shr_u + i64.shr_s local.set $27 local.get $20 local.get $21 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 1a6b1e62cd..bd57e1a396 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -77,7 +77,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 @@ -129,7 +129,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $2 if i32.const 0 @@ -221,7 +221,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/resolve-unary.untouched.wat b/tests/compiler/resolve-unary.untouched.wat index 43466944f9..4399644069 100644 --- a/tests/compiler/resolve-unary.untouched.wat +++ b/tests/compiler/resolve-unary.untouched.wat @@ -124,7 +124,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -377,7 +377,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -522,7 +522,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -605,7 +605,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $2 if @@ -655,7 +655,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -729,7 +729,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/retain-i32.optimized.wat b/tests/compiler/retain-i32.optimized.wat index 99faa43113..22d7a94dc8 100644 --- a/tests/compiler/retain-i32.optimized.wat +++ b/tests/compiler/retain-i32.optimized.wat @@ -1,5 +1,7 @@ (module (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\1a\00\00\00\01\00\00\00\01\00\00\00\1a\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") (export "memory" (memory $0)) @@ -21,10 +23,10 @@ end end i32.const 0 - i32.load8_s - drop - i32.const 0 - i32.load8_s - drop + i32.const 1040 + i32.const 78 + i32.const 1 + call $~lib/builtins/abort + unreachable ) ) diff --git a/tests/compiler/retain-i32.untouched.wat b/tests/compiler/retain-i32.untouched.wat index a096fb55d4..b500a0ae0d 100644 --- a/tests/compiler/retain-i32.untouched.wat +++ b/tests/compiler/retain-i32.untouched.wat @@ -27,14 +27,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.get $0 local.get $1 i32.add i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -51,14 +51,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.get $0 local.get $1 i32.sub i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -75,14 +75,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.get $0 local.get $1 i32.mul i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -99,14 +99,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.get $0 local.get $1 i32.and i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -123,14 +123,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.get $0 local.get $1 i32.or i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -147,14 +147,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.get $0 local.get $1 i32.xor i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -171,14 +171,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.get $0 local.get $1 i32.shl i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -470,7 +470,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u global.set $retain-i32/si global.get $retain-i32/si i32.const -1 @@ -492,7 +492,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u global.set $retain-i32/si global.get $retain-i32/si i32.const -1 @@ -512,7 +512,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u global.set $retain-i32/si global.get $retain-i32/si i32.const -2 @@ -532,7 +532,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u global.set $retain-i32/si global.get $retain-i32/si i32.const -128 @@ -552,7 +552,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u global.set $retain-i32/si global.get $retain-i32/si i32.const -128 @@ -572,7 +572,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u global.set $retain-i32/si global.get $retain-i32/si i32.const -127 @@ -592,7 +592,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u global.set $retain-i32/si global.get $retain-i32/si i32.const -128 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 686f1bd9d3..e210954154 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -92,7 +92,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -103,7 +103,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -393,7 +393,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -404,7 +404,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -720,7 +720,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -747,7 +747,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -980,7 +980,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1614,7 +1614,7 @@ i32.load offset=8 local.tee $2 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 @@ -1693,7 +1693,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/retain-release-sanity.untouched.wat b/tests/compiler/retain-release-sanity.untouched.wat index 917fefc811..6061dafd27 100644 --- a/tests/compiler/retain-release-sanity.untouched.wat +++ b/tests/compiler/retain-release-sanity.untouched.wat @@ -116,7 +116,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -128,7 +128,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -502,7 +502,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -514,7 +514,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -827,7 +827,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -991,7 +991,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1021,7 +1021,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1211,7 +1211,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1789,7 +1789,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -2151,7 +2151,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2167,7 +2167,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2183,7 +2183,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2199,7 +2199,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2272,7 +2272,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2288,7 +2288,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2304,7 +2304,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2320,7 +2320,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2379,7 +2379,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2395,7 +2395,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2411,7 +2411,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2427,7 +2427,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -3301,13 +3301,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -3444,7 +3444,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -3524,7 +3524,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -3618,7 +3618,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index d5e575aef0..511893aa2d 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -99,7 +99,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/retain-release.untouched.wat b/tests/compiler/retain-release.untouched.wat index aa25a055a3..2ad146c342 100644 --- a/tests/compiler/retain-release.untouched.wat +++ b/tests/compiler/retain-release.untouched.wat @@ -83,7 +83,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 2265222389..6c293547cc 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -70,7 +70,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -81,7 +81,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -371,7 +371,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -382,7 +382,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -766,7 +766,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/retain-return.untouched.wat b/tests/compiler/retain-return.untouched.wat index 60f06964d6..8d68badab9 100644 --- a/tests/compiler/retain-return.untouched.wat +++ b/tests/compiler/retain-return.untouched.wat @@ -100,7 +100,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -112,7 +112,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -486,7 +486,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -498,7 +498,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -811,7 +811,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -975,7 +975,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1005,7 +1005,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1195,7 +1195,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rt/finalize.optimized.wat b/tests/compiler/rt/finalize.optimized.wat index cad0f1fc39..a9ec6c9b08 100644 --- a/tests/compiler/rt/finalize.optimized.wat +++ b/tests/compiler/rt/finalize.optimized.wat @@ -90,7 +90,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -101,7 +101,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -391,7 +391,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -402,7 +402,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -694,7 +694,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -721,7 +721,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -974,7 +974,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1270,7 +1270,7 @@ i32.sub i32.load offset=12 i32.const 2 - i32.shr_u + i32.shr_s ) (func $rt/finalize/expect (param $0 i32) (local $1 i32) diff --git a/tests/compiler/rt/finalize.untouched.wat b/tests/compiler/rt/finalize.untouched.wat index 5819deea71..562fc689bb 100644 --- a/tests/compiler/rt/finalize.untouched.wat +++ b/tests/compiler/rt/finalize.untouched.wat @@ -114,7 +114,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -126,7 +126,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -500,7 +500,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -512,7 +512,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -825,7 +825,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -989,7 +989,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1019,7 +1019,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1209,7 +1209,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1760,7 +1760,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -1819,7 +1819,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -1875,7 +1875,7 @@ i32.sub i32.load offset=12 i32.const 2 - i32.shr_u + i32.shr_s ) (func $~lib/staticarray/StaticArray#__uset (param $0 i32) (param $1 i32) (param $2 i32) i32.const 0 @@ -2494,7 +2494,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2510,7 +2510,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2526,7 +2526,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2542,7 +2542,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2615,7 +2615,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2631,7 +2631,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2647,7 +2647,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2663,7 +2663,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2722,7 +2722,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2738,7 +2738,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2754,7 +2754,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2770,7 +2770,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index d433725220..4dd57c2598 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -45,7 +45,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/rt/instanceof.untouched.wat b/tests/compiler/rt/instanceof.untouched.wat index a1cb7ea6d1..d848eefaf7 100644 --- a/tests/compiler/rt/instanceof.untouched.wat +++ b/tests/compiler/rt/instanceof.untouched.wat @@ -51,7 +51,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index f8dd972f4e..3e7bd7bd74 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -45,7 +45,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $1 local.get $2 local.get $1 diff --git a/tests/compiler/rt/stub-realloc.untouched.wat b/tests/compiler/rt/stub-realloc.untouched.wat index 081fb46313..9ef62b990b 100644 --- a/tests/compiler/rt/stub-realloc.untouched.wat +++ b/tests/compiler/rt/stub-realloc.untouched.wat @@ -54,7 +54,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -414,7 +414,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -430,7 +430,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -446,7 +446,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -462,7 +462,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -535,7 +535,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -551,7 +551,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -567,7 +567,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -583,7 +583,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -642,7 +642,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -658,7 +658,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -674,7 +674,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -690,7 +690,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index b1cfbd7047..5a4b38da39 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -68,7 +68,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -79,7 +79,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -369,7 +369,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -380,7 +380,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -672,7 +672,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -699,7 +699,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -951,7 +951,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 diff --git a/tests/compiler/runtime-full.untouched.wat b/tests/compiler/runtime-full.untouched.wat index 982cc205cd..bf8e9d96ef 100644 --- a/tests/compiler/runtime-full.untouched.wat +++ b/tests/compiler/runtime-full.untouched.wat @@ -90,7 +90,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -102,7 +102,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -476,7 +476,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -488,7 +488,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -801,7 +801,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -965,7 +965,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -995,7 +995,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1185,7 +1185,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index 6825547dd7..c72a6fe9eb 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -62,7 +62,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/runtime-stub.untouched.wat b/tests/compiler/runtime-stub.untouched.wat index 6fb4fec6af..21cb2052ba 100644 --- a/tests/compiler/runtime-stub.untouched.wat +++ b/tests/compiler/runtime-stub.untouched.wat @@ -44,7 +44,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 8c4643e1d0..6619448d18 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -74,7 +74,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $std/array-access/stringArrayPropertyAccess (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 5a71f70c10..7599507c93 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -172,7 +172,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $std/array-access/stringArrayPropertyAccess (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 0360098a44..b8e54a36b0 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -120,7 +120,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -131,7 +131,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -421,7 +421,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -432,7 +432,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -724,7 +724,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -751,7 +751,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -1003,7 +1003,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 3e64393f57..63372462eb 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -177,7 +177,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -189,7 +189,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -563,7 +563,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -575,7 +575,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -888,7 +888,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1052,7 +1052,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1082,7 +1082,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1272,7 +1272,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1806,7 +1806,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1822,7 +1822,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1838,7 +1838,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1854,7 +1854,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1927,7 +1927,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1943,7 +1943,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -1959,7 +1959,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1975,7 +1975,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2034,7 +2034,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2050,7 +2050,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2066,7 +2066,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2082,7 +2082,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index feee7718d4..67ccd87295 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -451,7 +451,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -462,7 +462,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -752,7 +752,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -763,7 +763,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -1079,7 +1079,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -1106,7 +1106,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -1338,7 +1338,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -2265,7 +2265,7 @@ i32.sub i32.load offset=12 i32.const 2 - i32.shr_s + i32.shr_u local.get $0 call $~lib/rt/pure/__release local.get $1 @@ -2437,13 +2437,13 @@ i32.load offset=8 local.tee $3 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 1040 @@ -4144,21 +4144,21 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor i64.const -49064778989728563 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor i64.const -4265267296055464877 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor ) (func $~lib/math/splitMix32 (param $0 i32) (result i32) @@ -4168,7 +4168,7 @@ local.tee $0 local.get $0 i32.const 15 - i32.shr_u + i32.shr_s i32.xor local.get $0 i32.const 1 @@ -4182,7 +4182,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_u + i32.shr_s i32.xor i32.mul i32.add @@ -4190,7 +4190,7 @@ local.tee $0 local.get $0 i32.const 14 - i32.shr_u + i32.shr_s i32.xor ) (func $~lib/math/NativeMath.seedRandom (param $0 i64) @@ -4336,7 +4336,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.tee $2 @@ -4364,24 +4364,24 @@ local.get $5 local.get $2 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $2 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq if local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.set $2 br $while-continue|1 end @@ -4389,7 +4389,7 @@ local.get $0 local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 2 i32.shl @@ -4416,7 +4416,7 @@ local.get $5 local.get $3 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -4482,7 +4482,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -4490,7 +4490,7 @@ local.get $1 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and local.get $1 @@ -4534,7 +4534,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -4561,7 +4561,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 br $while-continue|4 end @@ -4677,7 +4677,7 @@ local.tee $2 local.get $2 i32.const 31 - i32.shr_s + i32.shr_u i32.const 1 i32.shr_u i32.xor @@ -4687,7 +4687,7 @@ local.tee $3 local.get $3 i32.const 31 - i32.shr_s + i32.shr_u i32.const 1 i32.shr_u i32.xor @@ -4874,7 +4874,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.tee $2 @@ -4902,24 +4902,24 @@ local.get $5 local.get $2 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $2 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq if local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.set $2 br $while-continue|1 end @@ -4927,7 +4927,7 @@ local.get $0 local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 3 i32.shl @@ -4954,7 +4954,7 @@ local.get $5 local.get $3 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -5020,7 +5020,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -5028,7 +5028,7 @@ local.get $1 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and local.get $1 @@ -5072,7 +5072,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -5099,7 +5099,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 br $while-continue|4 end @@ -5215,7 +5215,7 @@ local.tee $2 local.get $2 i64.const 63 - i64.shr_s + i64.shr_u i64.const 1 i64.shr_u i64.xor @@ -5225,7 +5225,7 @@ local.tee $3 local.get $3 i64.const 63 - i64.shr_s + i64.shr_u i64.const 1 i64.shr_u i64.xor @@ -5433,7 +5433,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.tee $2 @@ -5461,24 +5461,24 @@ local.get $4 local.get $2 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $2 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq if local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.set $2 br $while-continue|1 end @@ -5486,7 +5486,7 @@ local.get $0 local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.tee $7 i32.const 2 i32.shl @@ -5513,7 +5513,7 @@ local.get $4 local.get $3 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -5579,7 +5579,7 @@ local.get $4 local.get $1 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -5587,7 +5587,7 @@ local.get $1 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and local.get $1 @@ -5631,7 +5631,7 @@ local.get $4 local.get $1 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -5658,7 +5658,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 br $while-continue|4 end @@ -5851,17 +5851,17 @@ local.tee $0 local.get $0 i64.const 17 - i64.shr_u + i64.shr_s i64.xor i64.xor local.get $1 i64.const 26 - i64.shr_u + i64.shr_s i64.xor global.set $~lib/math/random_state1_64 local.get $1 i64.const 12 - i64.shr_u + i64.shr_s i64.const 4607182418800017408 i64.or f64.reinterpret_i64 @@ -6529,7 +6529,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -7290,7 +7290,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $1 if i32.const 0 @@ -7706,7 +7706,7 @@ local.get $3 local.get $11 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -7953,7 +7953,7 @@ i64.mul local.tee $3 local.get $13 - i64.shr_u + i64.shr_s local.tee $1 local.get $6 i64.extend_i32_s @@ -8409,7 +8409,7 @@ f64.ne i32.add i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.tee $4 @@ -8437,12 +8437,12 @@ local.set $2 local.get $6 i64.const 32 - i64.shr_u + i64.shr_s local.tee $6 global.get $~lib/util/number/_frc_plus local.tee $5 i64.const 32 - i64.shr_u + i64.shr_s local.tee $7 i64.mul local.get $2 @@ -8455,11 +8455,11 @@ local.tee $5 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $5 local.get $6 @@ -8471,7 +8471,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.sub @@ -8492,7 +8492,7 @@ i64.shl local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s local.tee $7 i64.mul local.get $2 @@ -8505,11 +8505,11 @@ local.tee $3 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $3 local.get $6 @@ -8521,7 +8521,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add global.get $~lib/util/number/_exp_pow local.tee $4 @@ -8542,7 +8542,7 @@ global.get $~lib/util/number/_frc_minus local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s local.tee $5 i64.mul local.get $2 @@ -8555,11 +8555,11 @@ local.tee $2 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $2 local.get $6 @@ -8571,7 +8571,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.add @@ -9201,9 +9201,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 0 - i32.lt_s + i32.lt_u local.tee $2 if local.get $0 @@ -9218,7 +9218,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 10 i32.lt_u if @@ -9231,7 +9231,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 48 i32.or i32.store16 @@ -9245,7 +9245,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.tee $2 call $~lib/util/number/decimalCount32 i32.add @@ -9903,7 +9903,7 @@ drop local.get $3 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $0 if @@ -18653,7 +18653,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.tee $2 @@ -18681,24 +18681,24 @@ local.get $4 local.get $2 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $2 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq if local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.set $2 br $while-continue|1 end @@ -18706,7 +18706,7 @@ local.get $0 local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.tee $7 i32.add i32.load8_u @@ -18729,7 +18729,7 @@ local.get $4 local.get $3 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -18789,7 +18789,7 @@ local.get $4 local.get $1 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -18797,7 +18797,7 @@ local.get $1 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and local.get $1 @@ -18839,7 +18839,7 @@ local.get $4 local.get $1 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -18864,7 +18864,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 br $while-continue|4 end diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 347bea9cff..497195fe6f 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -479,7 +479,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -491,7 +491,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -865,7 +865,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -877,7 +877,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1190,7 +1190,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1354,7 +1354,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1384,7 +1384,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1574,7 +1574,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -2152,7 +2152,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -2279,7 +2279,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -2663,7 +2663,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2679,7 +2679,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2695,7 +2695,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2711,7 +2711,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2784,7 +2784,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2800,7 +2800,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2816,7 +2816,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2832,7 +2832,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2891,7 +2891,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2907,7 +2907,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2923,7 +2923,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2939,7 +2939,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -4140,7 +4140,7 @@ local.get $1 call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 2 - i32.shr_s + i32.shr_u local.set $2 local.get $0 call $~lib/rt/pure/__release @@ -4357,13 +4357,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -4588,7 +4588,7 @@ local.get $4 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -7306,7 +7306,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -7316,7 +7316,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -7326,7 +7326,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -7339,7 +7339,7 @@ local.get $0 local.get $0 i32.const 15 - i32.shr_u + i32.shr_s i32.xor local.get $0 i32.const 1 @@ -7351,7 +7351,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_u + i32.shr_s i32.xor local.get $0 i32.const 61 @@ -7363,7 +7363,7 @@ local.get $0 local.get $0 i32.const 14 - i32.shr_u + i32.shr_s i32.xor ) (func $~lib/math/NativeMath.seedRandom (param $0 i64) @@ -7538,7 +7538,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.set $3 @@ -7570,17 +7570,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq @@ -7589,14 +7589,14 @@ if local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 local.get $0 local.get $8 @@ -7625,14 +7625,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -7704,7 +7704,7 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -7712,7 +7712,7 @@ local.get $8 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.add @@ -7757,14 +7757,14 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $8 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -7789,7 +7789,7 @@ end local.get $8 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 br $while-continue|4 end @@ -7924,17 +7924,17 @@ local.get $2 local.get $2 i32.const 31 - i32.shr_s - i32.const 1 i32.shr_u + i32.const 1 + i32.shr_s i32.xor local.set $2 local.get $3 local.get $3 i32.const 31 - i32.shr_s - i32.const 1 i32.shr_u + i32.const 1 + i32.shr_s i32.xor local.set $3 local.get $2 @@ -8203,7 +8203,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.set $3 @@ -8235,17 +8235,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq @@ -8254,14 +8254,14 @@ if local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 local.get $0 local.get $8 @@ -8290,14 +8290,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -8369,7 +8369,7 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -8377,7 +8377,7 @@ local.get $8 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.add @@ -8422,14 +8422,14 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $8 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -8454,7 +8454,7 @@ end local.get $8 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 br $while-continue|4 end @@ -8589,17 +8589,17 @@ local.get $2 local.get $2 i64.const 63 - i64.shr_s - i64.const 1 i64.shr_u + i64.const 1 + i64.shr_s i64.xor local.set $2 local.get $3 local.get $3 i64.const 63 - i64.shr_s - i64.const 1 i64.shr_u + i64.const 1 + i64.shr_s i64.xor local.set $3 local.get $2 @@ -8903,7 +8903,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.set $3 @@ -8935,17 +8935,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq @@ -8954,14 +8954,14 @@ if local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 local.get $0 local.get $8 @@ -8990,14 +8990,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -9069,7 +9069,7 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -9077,7 +9077,7 @@ local.get $9 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.add @@ -9122,14 +9122,14 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $9 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -9154,7 +9154,7 @@ end local.get $9 i32.const 1 - i32.shr_s + i32.shr_u local.set $9 br $while-continue|4 end @@ -9432,7 +9432,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.set $3 @@ -9464,17 +9464,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq @@ -9483,14 +9483,14 @@ if local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 local.get $0 local.get $8 @@ -9519,14 +9519,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -9598,7 +9598,7 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -9606,7 +9606,7 @@ local.get $9 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.add @@ -9651,14 +9651,14 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $9 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -9683,7 +9683,7 @@ end local.get $9 i32.const 1 - i32.shr_s + i32.shr_u local.set $9 br $while-continue|4 end @@ -9911,7 +9911,7 @@ local.get $0 local.get $0 i64.const 17 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -9921,14 +9921,14 @@ local.get $0 local.get $1 i64.const 26 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 global.set $~lib/math/random_state1_64 local.get $1 i64.const 12 - i64.shr_u + i64.shr_s i64.const 4607182418800017408 i64.or local.set $2 @@ -10148,7 +10148,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -10714,7 +10714,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -11602,7 +11602,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -12089,7 +12089,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -13452,7 +13452,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -13597,7 +13597,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -13677,7 +13677,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $2 if @@ -13727,7 +13727,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -14121,7 +14121,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $3 @@ -14452,7 +14452,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $11 local.get $3 @@ -14773,7 +14773,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s local.set $22 local.get $22 local.get $14 @@ -15289,7 +15289,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $7 local.get $6 @@ -15388,7 +15388,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $14 @@ -15443,11 +15443,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -15458,7 +15458,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -15475,11 +15475,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $24 i64.const 32 - i64.shr_u + i64.shr_s local.set $24 local.get $20 local.get $21 @@ -15513,11 +15513,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $23 local.get $22 @@ -15528,7 +15528,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $18 local.get $23 @@ -15545,11 +15545,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_u + i64.shr_s local.set $18 local.get $25 i64.const 32 - i64.shr_u + i64.shr_s local.set $25 local.get $21 local.get $20 @@ -15585,11 +15585,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -15600,7 +15600,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -15617,11 +15617,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $27 i64.const 32 - i64.shr_u + i64.shr_s local.set $27 local.get $20 local.get $21 @@ -16754,7 +16754,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 0 i32.lt_s local.set $2 @@ -16782,7 +16782,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 10 i32.lt_u if @@ -16795,7 +16795,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 48 i32.or i32.store16 @@ -16815,7 +16815,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/number/decimalCount32 i32.add local.set $3 @@ -16825,7 +16825,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.set $4 @@ -17573,7 +17573,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $4 @@ -17932,7 +17932,7 @@ end local.get $0 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 local.get $2 @@ -18019,7 +18019,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -26115,7 +26115,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -26621,7 +26621,7 @@ local.get $4 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -27413,7 +27413,7 @@ local.get $1 i32.const 1073741808 i32.const 0 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -27923,7 +27923,7 @@ local.get $4 i32.const 1073741808 i32.const 0 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -28780,7 +28780,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.set $3 @@ -28812,17 +28812,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq @@ -28831,14 +28831,14 @@ if local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 local.get $0 local.get $8 @@ -28867,14 +28867,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -28946,7 +28946,7 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -28954,7 +28954,7 @@ local.get $9 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.add @@ -28999,14 +28999,14 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $9 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -29031,7 +29031,7 @@ end local.get $9 i32.const 1 - i32.shr_s + i32.shr_u local.set $9 br $while-continue|4 end @@ -29782,7 +29782,7 @@ local.get $4 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 74e1c922e2..c479984cb9 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -82,7 +82,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -93,7 +93,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -383,7 +383,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -394,7 +394,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -686,7 +686,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -713,7 +713,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -965,7 +965,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1527,7 +1527,7 @@ i32.const 1 i32.const 1073741808 local.get $1 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 1040 diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 36a60407d6..5b1771ef94 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -107,7 +107,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -119,7 +119,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -493,7 +493,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -505,7 +505,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -818,7 +818,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -982,7 +982,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1012,7 +1012,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1202,7 +1202,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -2049,7 +2049,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2065,7 +2065,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2081,7 +2081,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2097,7 +2097,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2170,7 +2170,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2186,7 +2186,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2202,7 +2202,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2218,7 +2218,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2277,7 +2277,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2293,7 +2293,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2309,7 +2309,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2325,7 +2325,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -3339,7 +3339,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index f710a3aca4..66509cceec 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -90,7 +90,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -101,7 +101,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -391,7 +391,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -402,7 +402,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -694,7 +694,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -721,7 +721,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -973,7 +973,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1295,7 +1295,7 @@ (func $~lib/dataview/DataView#getFloat32 (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 4 i32.add @@ -1331,7 +1331,7 @@ (func $~lib/polyfills/bswap (param $0 i64) (result i64) local.get $0 i64.const 8 - i64.shr_u + i64.shr_s i64.const 71777214294589695 i64.and local.get $0 @@ -1342,7 +1342,7 @@ i64.or local.tee $0 i64.const 16 - i64.shr_u + i64.shr_s i64.const 281470681808895 i64.and local.get $0 @@ -1401,21 +1401,19 @@ ) (func $~lib/polyfills/bswap (param $0 i32) (result i32) local.get $0 - i32.const 16 + i32.const 8 i32.shl - i32.const 24 - i32.shr_s - i32.const 255 - i32.and local.get $0 - i32.const 8 + i32.const 16 i32.shl + i32.const 24 + i32.shr_u i32.or ) (func $~lib/dataview/DataView#getInt16 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 2 i32.add @@ -1448,7 +1446,7 @@ (func $~lib/dataview/DataView#getInt32 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 4 i32.add @@ -1537,7 +1535,7 @@ (func $~lib/dataview/DataView#getUint16 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 2 i32.add @@ -1570,7 +1568,7 @@ (func $~lib/dataview/DataView#getUint32 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 4 i32.add @@ -2149,9 +2147,11 @@ i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and - i32.const 57590 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.const -7946 i32.ne if i32.const 0 @@ -2165,8 +2165,10 @@ i32.const 1 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 22752 i32.ne if @@ -2181,9 +2183,11 @@ i32.const 2 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and - i32.const 40792 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.const -24744 i32.ne if i32.const 0 @@ -2197,9 +2201,11 @@ i32.const 3 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and - i32.const 33439 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.const -32097 i32.ne if i32.const 0 @@ -2213,8 +2219,10 @@ i32.const 4 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 25986 i32.ne if @@ -2229,8 +2237,10 @@ i32.const 5 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 17253 i32.ne if @@ -2245,8 +2255,10 @@ i32.const 6 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 24387 i32.ne if @@ -2261,9 +2273,11 @@ i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and - i32.const 63200 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.const -2336 i32.ne if i32.const 0 @@ -2277,9 +2291,11 @@ i32.const 1 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and - i32.const 57432 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.const -8104 i32.ne if i32.const 0 @@ -2293,8 +2309,10 @@ i32.const 2 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 22687 i32.ne if @@ -2309,9 +2327,11 @@ i32.const 3 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and - i32.const 40834 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.const -24702 i32.ne if i32.const 0 @@ -2325,9 +2345,11 @@ i32.const 4 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and - i32.const 33381 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.const -32155 i32.ne if i32.const 0 @@ -2341,8 +2363,10 @@ i32.const 5 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 25923 i32.ne if @@ -2357,8 +2381,10 @@ i32.const 6 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 17247 i32.ne if @@ -3136,9 +3162,11 @@ i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and - i32.const 52176 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.const -13360 i32.ne if i32.const 0 @@ -3156,8 +3184,10 @@ i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 14689 i32.ne if diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index d0b78e568f..e5ebb22bd4 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -115,7 +115,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -127,7 +127,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -501,7 +501,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -513,7 +513,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -826,7 +826,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -990,7 +990,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1020,7 +1020,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1210,7 +1210,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1784,7 +1784,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -1982,7 +1982,7 @@ (func $~lib/dataview/DataView#getFloat32 (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 4 i32.add @@ -2035,7 +2035,7 @@ drop local.get $0 i64.const 8 - i64.shr_u + i64.shr_s i64.const 71777214294589695 i64.and local.set $1 @@ -2051,7 +2051,7 @@ local.set $3 local.get $3 i64.const 16 - i64.shr_u + i64.shr_s i64.const 281470681808895 i64.and local.set $1 @@ -2071,7 +2071,7 @@ (func $~lib/dataview/DataView#getFloat64 (param $0 i32) (param $1 i32) (param $2 i32) (result f64) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 8 i32.add @@ -2137,9 +2137,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.or @@ -2149,7 +2149,7 @@ (local $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 2 i32.add @@ -2207,7 +2207,7 @@ (local $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 4 i32.add @@ -2257,7 +2257,7 @@ drop local.get $0 i64.const 8 - i64.shr_u + i64.shr_s i64.const 71777214294589695 i64.and local.set $1 @@ -2273,7 +2273,7 @@ local.set $3 local.get $3 i64.const 16 - i64.shr_u + i64.shr_s i64.const 281470681808895 i64.and local.set $1 @@ -2294,7 +2294,7 @@ (local $3 i64) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 8 i32.add @@ -2357,7 +2357,7 @@ i32.const 65535 i32.and i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.or @@ -2367,7 +2367,7 @@ (local $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 2 i32.add @@ -2401,7 +2401,7 @@ (local $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 4 i32.add @@ -2435,7 +2435,7 @@ (local $3 i64) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 8 i32.add @@ -2468,7 +2468,7 @@ (func $~lib/dataview/DataView#setFloat32 (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 4 i32.add @@ -2506,7 +2506,7 @@ (func $~lib/dataview/DataView#setFloat64 (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 8 i32.add @@ -2564,7 +2564,7 @@ (func $~lib/dataview/DataView#setInt16 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 2 i32.add @@ -2596,7 +2596,7 @@ (func $~lib/dataview/DataView#setInt32 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 4 i32.add @@ -2628,7 +2628,7 @@ (func $~lib/dataview/DataView#setInt64 (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 8 i32.add @@ -2680,7 +2680,7 @@ (func $~lib/dataview/DataView#setUint16 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 2 i32.add @@ -2712,7 +2712,7 @@ (func $~lib/dataview/DataView#setUint32 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 4 i32.add @@ -2744,7 +2744,7 @@ (func $~lib/dataview/DataView#setUint64 (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 8 i32.add @@ -3153,7 +3153,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -7946 i32.eq i32.eqz @@ -3172,7 +3172,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 22752 i32.eq i32.eqz @@ -3191,7 +3191,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -24744 i32.eq i32.eqz @@ -3210,7 +3210,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -32097 i32.eq i32.eqz @@ -3229,7 +3229,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 25986 i32.eq i32.eqz @@ -3248,7 +3248,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 17253 i32.eq i32.eqz @@ -3267,7 +3267,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 24387 i32.eq i32.eqz @@ -3286,7 +3286,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -2336 i32.eq i32.eqz @@ -3305,7 +3305,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -8104 i32.eq i32.eqz @@ -3324,7 +3324,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 22687 i32.eq i32.eqz @@ -3343,7 +3343,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -24702 i32.eq i32.eqz @@ -3362,7 +3362,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -32155 i32.eq i32.eqz @@ -3381,7 +3381,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 25923 i32.eq i32.eqz @@ -3400,7 +3400,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 17247 i32.eq i32.eqz @@ -4232,7 +4232,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const -13360 i32.eq i32.eqz @@ -4256,7 +4256,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 14689 i32.eq i32.eqz diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index fbe749fb7e..1fea671e67 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -104,7 +104,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $0 local.get $1 local.get $0 diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 1455f2e847..f6ff9e6e66 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -48,7 +48,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index fa88fcc653..6536303264 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -21,7 +21,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s i32.const 1 i32.shl local.set $3 diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 91e00d5a33..b8de60bda0 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -20,7 +20,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/rt/stub/__release (param $0 i32) nop @@ -94,7 +94,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -104,7 +104,7 @@ local.get $1 local.get $0 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -114,7 +114,7 @@ local.get $1 local.get $0 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -130,7 +130,7 @@ local.set $1 local.get $0 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 i32.const -2128831035 @@ -146,7 +146,7 @@ local.get $3 local.get $1 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -156,7 +156,7 @@ local.get $3 local.get $1 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -166,7 +166,7 @@ local.get $3 local.get $1 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -182,7 +182,7 @@ local.get $3 local.get $2 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -192,7 +192,7 @@ local.get $3 local.get $2 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -202,7 +202,7 @@ local.get $3 local.get $2 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 117298a2c0..a5c7959ae5 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -89,7 +89,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -100,7 +100,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -390,7 +390,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -401,7 +401,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -717,7 +717,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -744,7 +744,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -976,7 +976,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1333,10 +1333,12 @@ i32.const 0 else local.get $0 - i32.load8_u + i32.load8_s local.get $1 - i32.const 255 - i32.and + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u i32.eq end if @@ -1360,7 +1362,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 call $~lib/map/Map#find i32.const 0 @@ -1509,7 +1511,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 local.tee $5 call $~lib/map/Map#find @@ -1605,7 +1607,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $0 @@ -1920,13 +1922,13 @@ i32.load offset=8 local.tee $5 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 1200 @@ -2533,7 +2535,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 local.set $4 local.get $0 @@ -2559,10 +2561,12 @@ i32.const 0 else local.get $1 - i32.load8_u + i32.load8_s local.get $3 - i32.const 255 - i32.and + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u i32.eq end br_if $__inlined_func$~lib/map/Map#find @@ -2672,7 +2676,7 @@ i32.mul local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -2680,7 +2684,7 @@ i32.mul local.get $0 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -2688,7 +2692,7 @@ i32.mul local.get $0 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -2970,7 +2974,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $1 @@ -2993,7 +2997,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 1 i32.add @@ -3096,9 +3100,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 100 - i32.lt_s + i32.lt_u if local.get $0 local.get $1 @@ -3117,7 +3121,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 10 i32.add call $~lib/map/Map#set @@ -3141,7 +3145,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 10 i32.add i32.ne @@ -3179,9 +3183,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 100 - i32.lt_s + i32.lt_u if local.get $0 local.get $1 @@ -3202,7 +3206,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 10 i32.add i32.ne @@ -3220,7 +3224,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 20 i32.add call $~lib/map/Map#set @@ -3244,7 +3248,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 20 i32.add i32.ne @@ -3412,9 +3416,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 50 - i32.lt_s + i32.lt_u if local.get $0 local.get $2 @@ -3435,7 +3439,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 20 i32.add i32.ne @@ -3487,9 +3491,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 50 - i32.lt_s + i32.lt_u if local.get $0 local.get $2 @@ -3508,7 +3512,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 10 i32.add call $~lib/map/Map#set @@ -3581,6 +3585,49 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=8 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=8 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -3588,7 +3635,7 @@ i32.const 255 i32.and call $~lib/util/hash/hash8 - call $~lib/map/Map#find + call $~lib/map/Map#find i32.const 0 i32.ne ) @@ -3736,7 +3783,7 @@ i32.and call $~lib/util/hash/hash8 local.tee $5 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $3 if local.get $3 @@ -3829,7 +3876,7 @@ i32.const 255 i32.and call $~lib/util/hash/hash8 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $0 i32.eqz if @@ -4233,7 +4280,7 @@ i32.const 255 i32.and call $~lib/util/hash/hash8 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $1 i32.eqz if @@ -4254,7 +4301,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 1 i32.add @@ -4797,7 +4844,7 @@ i32.mul local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -4825,10 +4872,12 @@ i32.const 0 else local.get $0 - i32.load16_u + i32.load16_s local.get $1 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.eq end if @@ -4852,7 +4901,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 call $~lib/map/Map#find i32.const 0 @@ -5001,7 +5050,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 local.tee $5 call $~lib/map/Map#find @@ -5097,7 +5146,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 call $~lib/map/Map#find local.tee $0 @@ -5422,7 +5471,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 local.set $4 local.get $0 @@ -5448,10 +5497,12 @@ i32.const 0 else local.get $1 - i32.load16_u + i32.load16_s local.get $3 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.eq end br_if $__inlined_func$~lib/map/Map#find @@ -5559,7 +5610,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 call $~lib/map/Map#find local.tee $1 @@ -5582,7 +5633,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 1 i32.add @@ -5652,9 +5703,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 100 - i32.lt_s + i32.lt_u if local.get $0 local.get $1 @@ -5673,7 +5724,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 10 i32.add call $~lib/map/Map#set @@ -5697,7 +5748,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 10 i32.add i32.ne @@ -5735,9 +5786,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 100 - i32.lt_s + i32.lt_u if local.get $0 local.get $1 @@ -5758,7 +5809,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 10 i32.add i32.ne @@ -5776,7 +5827,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 20 i32.add call $~lib/map/Map#set @@ -5800,7 +5851,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 20 i32.add i32.ne @@ -5970,9 +6021,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 50 - i32.lt_s + i32.lt_u if local.get $0 local.get $2 @@ -5993,7 +6044,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 20 i32.add i32.ne @@ -6045,9 +6096,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 50 - i32.lt_s + i32.lt_u if local.get $0 local.get $2 @@ -6066,7 +6117,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 10 i32.add call $~lib/map/Map#set @@ -6139,6 +6190,49 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=8 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=8 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -6146,7 +6240,7 @@ i32.const 65535 i32.and call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#find i32.const 0 i32.ne ) @@ -6294,7 +6388,7 @@ i32.and call $~lib/util/hash/hash16 local.tee $5 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $3 if local.get $3 @@ -6387,7 +6481,7 @@ i32.const 65535 i32.and call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $0 i32.eqz if @@ -6795,7 +6889,7 @@ i32.const 65535 i32.and call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $1 i32.eqz if @@ -6816,7 +6910,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 1 i32.add @@ -7406,7 +7500,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 1 i32.add @@ -8495,7 +8589,7 @@ i32.mul local.get $1 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -8503,7 +8597,7 @@ i32.mul local.get $1 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -8511,13 +8605,13 @@ i32.mul local.get $1 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul local.get $0 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $1 i32.const 255 @@ -8527,7 +8621,7 @@ i32.mul local.get $1 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -8535,7 +8629,7 @@ i32.mul local.get $1 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -8543,7 +8637,7 @@ i32.mul local.get $1 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -9377,7 +9471,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 i32.const 1 i32.add @@ -11216,7 +11310,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 i32.const 1 i32.add @@ -12484,7 +12578,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 i32.const 1 i32.add diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 0d84e733ec..5feabe4c57 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -113,7 +113,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -125,7 +125,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -499,7 +499,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -511,7 +511,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -824,7 +824,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -988,7 +988,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1018,7 +1018,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1208,7 +1208,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1874,7 +1874,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq else i32.const 0 @@ -1916,7 +1916,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.0 end @@ -2113,7 +2113,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.1 end @@ -2234,7 +2234,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.3 end @@ -2287,7 +2287,7 @@ local.get $1 i32.const 1073741808 i32.const 0 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -2649,7 +2649,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2665,7 +2665,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2681,7 +2681,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2697,7 +2697,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2770,7 +2770,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2786,7 +2786,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2802,7 +2802,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2818,7 +2818,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2877,7 +2877,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2893,7 +2893,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2909,7 +2909,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2925,7 +2925,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -3799,13 +3799,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -4006,7 +4006,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -4359,7 +4359,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq else i32.const 0 @@ -4569,7 +4569,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.4 end @@ -4683,7 +4683,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -4693,7 +4693,7 @@ local.get $1 local.get $0 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -4703,7 +4703,7 @@ local.get $1 local.get $0 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -5090,7 +5090,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.6 end @@ -5121,7 +5121,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -5222,7 +5222,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 100 i32.lt_s local.set $3 @@ -5248,7 +5248,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -5272,7 +5272,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.add i32.eq i32.eqz @@ -5311,7 +5311,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 100 i32.lt_s local.set $4 @@ -5337,7 +5337,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.add i32.eq i32.eqz @@ -5356,7 +5356,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -5380,7 +5380,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.add i32.eq i32.eqz @@ -5522,7 +5522,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 50 i32.lt_s local.set $10 @@ -5548,7 +5548,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.add i32.eq i32.eqz @@ -5604,7 +5604,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 50 i32.lt_s local.set $9 @@ -5630,7 +5630,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -6185,7 +6185,7 @@ local.get $1 i32.const 1073741808 i32.const 0 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -6894,7 +6894,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -7515,7 +7515,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -7553,7 +7553,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eq else i32.const 0 @@ -7599,7 +7599,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.0 end @@ -7804,7 +7804,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.1 end @@ -7929,7 +7929,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.3 end @@ -7982,7 +7982,7 @@ local.get $1 i32.const 1073741808 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -8329,7 +8329,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eq else i32.const 0 @@ -8547,7 +8547,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.4 end @@ -8678,7 +8678,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.6 end @@ -8709,7 +8709,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -8810,7 +8810,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 100 i32.lt_s local.set $3 @@ -8836,7 +8836,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -8860,7 +8860,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.add i32.eq i32.eqz @@ -8899,7 +8899,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 100 i32.lt_s local.set $4 @@ -8925,7 +8925,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.add i32.eq i32.eqz @@ -8944,7 +8944,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -8968,7 +8968,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.add i32.eq i32.eqz @@ -9110,7 +9110,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 50 i32.lt_s local.set $10 @@ -9136,7 +9136,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.add i32.eq i32.eqz @@ -9192,7 +9192,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 50 i32.lt_s local.set $9 @@ -9218,7 +9218,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -9789,7 +9789,7 @@ local.get $1 i32.const 1073741808 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -10510,7 +10510,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -11347,7 +11347,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -12389,7 +12389,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -13116,7 +13116,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -13707,7 +13707,7 @@ local.set $1 local.get $0 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 i32.const -2128831035 @@ -13723,7 +13723,7 @@ local.get $3 local.get $1 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -13733,7 +13733,7 @@ local.get $3 local.get $1 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -13743,7 +13743,7 @@ local.get $3 local.get $1 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -13759,7 +13759,7 @@ local.get $3 local.get $2 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -13769,7 +13769,7 @@ local.get $3 local.get $2 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -13779,7 +13779,7 @@ local.get $3 local.get $2 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -14264,7 +14264,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -15006,7 +15006,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -16074,7 +16074,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -16816,7 +16816,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -17840,7 +17840,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -18549,7 +18549,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -19589,7 +19589,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -20310,7 +20310,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 1e188883b7..f5d9838858 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -186,7 +186,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -194,7 +194,7 @@ local.get $1 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -229,7 +229,7 @@ local.get $1 i64.reinterpret_f64 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and i32.wrap_i64 @@ -375,13 +375,13 @@ local.get $0 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne local.get $1 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne i32.eq @@ -414,7 +414,7 @@ local.get $1 i32.reinterpret_f32 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.tee $3 @@ -552,7 +552,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $3 i32.const 2147483647 @@ -572,7 +572,7 @@ if local.get $3 i32.const 31 - i32.shr_u + i32.shr_s if f64.const 3.141592653589793 return @@ -614,7 +614,7 @@ end local.get $3 i32.const 31 - i32.shr_u + i32.shr_s if f64.const 1.5707963267948966 local.get $0 @@ -723,7 +723,7 @@ if local.get $3 i32.const 31 - i32.shr_u + i32.shr_s if f32.const 3.141592502593994 return @@ -765,7 +765,7 @@ end local.get $3 i32.const 31 - i32.shr_u + i32.shr_s if f32.const 1.570796251296997 local.get $0 @@ -840,11 +840,11 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 i32.const 31 - i32.shr_u + i32.shr_s local.get $2 i32.const 1071284858 i32.lt_u @@ -907,13 +907,13 @@ i64.reinterpret_f64 local.tee $5 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 614242 i32.add local.tee $2 i32.const 20 - i32.shr_u + i32.shr_s i32.const 1023 i32.sub local.tee $3 @@ -1035,11 +1035,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 1048576 i32.lt_u @@ -1059,7 +1059,7 @@ end local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if local.get $0 local.get $0 @@ -1076,7 +1076,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $1 else @@ -1171,7 +1171,7 @@ local.get $5 local.get $1 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub i32.add @@ -1196,7 +1196,7 @@ local.get $0 i64.reinterpret_f64 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.tee $4 @@ -1272,7 +1272,7 @@ i32.reinterpret_f32 local.tee $2 i32.const 31 - i32.shr_u + i32.shr_s local.get $2 i32.const 1054086096 i32.lt_u @@ -1338,7 +1338,7 @@ i32.add local.tee $2 i32.const 23 - i32.shr_u + i32.shr_s i32.const 127 i32.sub local.tee $3 @@ -1438,7 +1438,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 8388608 i32.lt_u @@ -1458,7 +1458,7 @@ end local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if local.get $0 local.get $0 @@ -1541,7 +1541,7 @@ local.get $4 local.get $1 i32.const 23 - i32.shr_s + i32.shr_u i32.const 127 i32.sub i32.add @@ -1622,7 +1622,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $4 i32.const 2147483647 @@ -1744,7 +1744,7 @@ local.set $0 local.get $4 i32.const 31 - i32.shr_u + i32.shr_s if local.get $0 f64.neg @@ -1869,7 +1869,7 @@ local.set $0 local.get $4 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.tee $4 @@ -2019,7 +2019,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -2453,7 +2453,7 @@ local.get $3 i64.reinterpret_f64 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.tee $4 @@ -2586,7 +2586,7 @@ i64.reinterpret_f64 local.tee $6 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $4 local.get $6 @@ -2599,7 +2599,7 @@ local.tee $7 local.get $6 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $5 i32.const 1072693248 @@ -2611,14 +2611,16 @@ call $~lib/math/NativeMath.atan return end + local.get $4 + i32.const 31 + i32.shr_s + i32.const 1 + i32.and local.get $5 i32.const 30 - i32.shr_u + i32.shr_s i32.const 2 i32.and - local.get $4 - i32.const 31 - i32.shr_u i32.or local.set $2 local.get $5 @@ -2815,14 +2817,16 @@ call $~lib/math/NativeMathf.atan return end + local.get $3 + i32.const 31 + i32.shr_s + i32.const 1 + i32.and local.get $4 i32.const 30 - i32.shr_u + i32.shr_s i32.const 2 i32.and - local.get $3 - i32.const 31 - i32.shr_u i32.or local.set $2 local.get $4 @@ -3000,7 +3004,7 @@ i64.reinterpret_f64 local.tee $4 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -3023,7 +3027,7 @@ i64.reinterpret_f64 local.tee $4 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -3274,12 +3278,12 @@ i64.const 9223372036854775807 i64.and i64.const 52 - i64.shr_s + i64.shr_u i64.const 1045 i64.sub local.tee $2 i64.const 6 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 3 i32.shl @@ -3309,7 +3313,7 @@ local.get $2 i64.sub local.tee $3 - i64.shr_u + i64.shr_s i64.or local.set $6 local.get $4 @@ -3317,7 +3321,7 @@ i64.shl local.get $1 local.get $3 - i64.shr_u + i64.shr_s i64.or local.set $4 local.get $1 @@ -3326,7 +3330,7 @@ local.get $7 i64.load offset=24 local.get $3 - i64.shr_u + i64.shr_s i64.or local.set $1 end @@ -3341,7 +3345,7 @@ local.tee $3 local.get $4 i64.const 32 - i64.shr_u + i64.shr_s local.tee $8 i64.mul local.get $4 @@ -3352,13 +3356,13 @@ i64.mul local.tee $9 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $4 local.get $5 local.get $2 i64.const 32 - i64.shr_u + i64.shr_s local.tee $5 i64.mul local.get $4 @@ -3371,11 +3375,11 @@ i64.mul local.get $4 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $3 i64.const 32 - i64.shr_u + i64.shr_s i64.add global.set $~lib/math/res128_hi global.get $~lib/math/res128_hi @@ -3385,10 +3389,10 @@ i64.add local.get $1 i64.const 32 - i64.shr_u + i64.shr_s local.get $2 i64.const 32 - i64.shr_s + i64.shr_u i64.mul local.tee $4 local.get $9 @@ -3409,14 +3413,14 @@ i64.shl local.get $2 i64.const 62 - i64.shr_u + i64.shr_s i64.or local.tee $6 i64.const 63 - i64.shr_s + i64.shr_u local.tee $1 i64.const 1 - i64.shr_s + i64.shr_u local.get $6 i64.xor local.tee $3 @@ -3434,7 +3438,7 @@ i64.const 64 local.get $4 i64.sub - i64.shr_u + i64.shr_s i64.or local.tee $2 i64.const 4294967295 @@ -3442,19 +3446,19 @@ local.set $3 local.get $2 i64.const 32 - i64.shr_u + i64.shr_s local.tee $9 i64.const 560513588 i64.mul local.get $3 - i64.const 3373259426 + i64.const -921707870 i64.mul local.get $3 i64.const 560513588 i64.mul local.tee $10 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $11 i64.const 4294967295 @@ -3462,15 +3466,15 @@ i64.add local.set $3 local.get $9 - i64.const 3373259426 + i64.const -921707870 i64.mul local.get $11 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $3 i64.const 32 - i64.shr_u + i64.shr_s i64.add global.set $~lib/math/res128_hi local.get $10 @@ -3499,7 +3503,7 @@ global.get $~lib/math/res128_hi local.tee $5 i64.const 11 - i64.shr_u + i64.shr_s i64.add f64.convert_i64_u global.set $~lib/math/rempio2_y0 @@ -3509,7 +3513,7 @@ i64.shl local.get $3 i64.const 11 - i64.shr_u + i64.shr_s i64.or i64.add f64.convert_i64_u @@ -3538,7 +3542,7 @@ global.set $~lib/math/rempio2_y1 local.get $8 i64.const 62 - i64.shr_s + i64.shr_u local.get $1 i64.sub i32.wrap_i64 @@ -3555,11 +3559,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $5 i32.const 31 - i32.shr_u + i32.shr_s local.set $6 local.get $5 i32.const 2147483647 @@ -3640,7 +3644,7 @@ block $~lib/math/rempio2|inlined.0 (result i32) local.get $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -3650,7 +3654,7 @@ if local.get $5 i32.const 20 - i32.shr_u + i32.shr_s local.tee $6 local.get $0 local.get $0 @@ -3670,10 +3674,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -3703,10 +3707,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -3914,7 +3918,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_u + i32.shr_s local.set $10 local.get $1 i32.const 2147483647 @@ -3997,12 +4001,12 @@ end local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 152 i32.sub local.tee $1 i32.const 6 - i32.shr_s + i32.shr_u i32.const 3 i32.shl i32.const 1256 @@ -4031,14 +4035,14 @@ i64.const 96 local.get $5 i64.sub - i64.shr_u + i64.shr_s i64.or else local.get $7 i64.const 32 local.get $5 i64.sub - i64.shr_u + i64.shr_s end local.set $11 f64.const 8.515303950216386e-20 @@ -4059,14 +4063,14 @@ i64.const 64 local.get $5 i64.sub - i64.shr_u + i64.shr_s i64.or i64.mul local.get $8 local.get $11 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $6 i64.const 2 @@ -4078,10 +4082,10 @@ i32.const 0 local.get $6 i64.const 62 - i64.shr_u + i64.shr_s local.get $8 i64.const 63 - i64.shr_u + i64.shr_s i64.add i32.wrap_i64 local.tee $1 @@ -4184,12 +4188,12 @@ i64.reinterpret_f64 local.tee $8 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $7 local.get $8 i64.const 32 - i64.shr_u + i64.shr_s i64.const 2147483647 i64.and i32.wrap_i64 @@ -4453,11 +4457,11 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 i32.const 31 - i32.shr_u + i32.shr_s local.set $6 local.get $2 i32.const 2147483647 @@ -4682,7 +4686,7 @@ i32.reinterpret_f32 local.tee $4 i32.const 31 - i32.shr_u + i32.shr_s local.set $6 local.get $4 i32.const 2147483647 @@ -4928,7 +4932,7 @@ i32.reinterpret_f32 local.tee $2 i32.const 31 - i32.shr_u + i32.shr_s local.set $4 local.get $2 i32.const 2147483647 @@ -5174,7 +5178,7 @@ i64.reinterpret_f64 local.tee $3 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and i32.wrap_i64 @@ -5213,7 +5217,7 @@ f64.const inf local.get $3 i64.const 63 - i64.shr_u + i64.shr_s i64.eqz br_if $~lib/util/math/exp2_lut|inlined.0 drop @@ -5394,7 +5398,7 @@ i32.reinterpret_f32 local.tee $2 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and local.tee $3 @@ -5536,7 +5540,7 @@ local.set $1 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $6 i32.const 2047 @@ -5553,7 +5557,7 @@ i64.eqz local.get $3 i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $10 i32.const 2047 @@ -5834,11 +5838,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 1048576 i32.lt_u @@ -5858,7 +5862,7 @@ end local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if local.get $0 local.get $0 @@ -5875,7 +5879,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $1 else @@ -5931,7 +5935,7 @@ local.get $8 local.get $1 i32.const 20 - i32.shr_u + i32.shr_s i32.const 1023 i32.sub i32.add @@ -6048,7 +6052,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 8388608 i32.lt_u @@ -6068,7 +6072,7 @@ end local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if local.get $0 local.get $0 @@ -6124,7 +6128,7 @@ local.get $5 local.get $1 i32.const 23 - i32.shr_u + i32.shr_s i32.const 127 i32.sub i32.add @@ -6237,11 +6241,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 1048576 i32.lt_u @@ -6261,7 +6265,7 @@ end local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if local.get $0 local.get $0 @@ -6278,7 +6282,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $1 else @@ -6334,7 +6338,7 @@ local.get $8 local.get $1 i32.const 20 - i32.shr_u + i32.shr_s i32.const 1023 i32.sub i32.add @@ -6443,7 +6447,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_u + i32.shr_s local.get $1 i32.const 8388608 i32.lt_u @@ -6463,7 +6467,7 @@ end local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if local.get $0 local.get $0 @@ -6572,7 +6576,7 @@ local.get $5 local.get $1 i32.const 23 - i32.shr_u + i32.shr_s i32.const 127 i32.sub i32.add @@ -6663,7 +6667,7 @@ i64.reinterpret_f64 local.tee $3 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $5 @@ -6671,7 +6675,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 63 - i64.shr_u + i64.shr_s local.set $7 i32.const 1 local.get $1 @@ -6680,7 +6684,7 @@ i32.const 1 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.tee $4 @@ -6735,8 +6739,6 @@ i64.shl else local.get $2 - i64.const 4503599627370495 - i64.and i64.const 4503599627370496 i64.or end @@ -6759,8 +6761,6 @@ i64.shl else local.get $3 - i64.const 4503599627370495 - i64.and i64.const 4503599627370496 i64.or end @@ -6836,7 +6836,7 @@ i64.sub i64.const 1 i64.add - i64.shr_u + i64.shr_s end local.get $7 i64.const 63 @@ -6892,7 +6892,7 @@ i32.reinterpret_f32 local.tee $3 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $5 @@ -6908,7 +6908,7 @@ f32.ne local.get $2 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.tee $4 @@ -6948,8 +6948,6 @@ local.get $4 if (result i32) local.get $2 - i32.const 8388607 - i32.and i32.const 8388608 i32.or else @@ -6969,8 +6967,6 @@ local.get $5 if (result i32) local.get $3 - i32.const 8388607 - i32.and i32.const 8388608 i32.or else @@ -7056,7 +7052,7 @@ i32.const 1 local.get $4 i32.sub - i32.shr_u + i32.shr_s end local.get $7 i32.or @@ -7153,7 +7149,7 @@ local.set $18 local.get $14 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $16 i32.const 2147483647 @@ -7163,7 +7159,7 @@ i64.reinterpret_f64 local.tee $14 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $8 i32.const 2147483647 @@ -7188,7 +7184,7 @@ i32.const 1 local.get $9 i32.const 2146435072 - i32.gt_s + i32.gt_u i32.const 1 local.get $18 i32.const 0 @@ -7214,19 +7210,19 @@ if (result i32) local.get $9 i32.const 1128267776 - i32.ge_s + i32.ge_u if (result i32) i32.const 2 else local.get $9 i32.const 1072693248 - i32.ge_s + i32.ge_u if (result i32) i32.const 52 i32.const 20 local.get $9 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub local.tee $11 @@ -7244,7 +7240,7 @@ select local.tee $5 local.get $12 - i32.shr_u + i32.shr_s local.tee $11 i32.const 1 i32.and @@ -7429,11 +7425,11 @@ local.set $10 local.get $9 i32.const 1105199104 - i32.gt_s + i32.gt_u if (result f64) local.get $9 i32.const 1139802112 - i32.gt_s + i32.gt_u if local.get $4 i32.const 1072693247 @@ -7549,7 +7545,7 @@ local.tee $3 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $4 i32.const -53 @@ -7558,7 +7554,7 @@ end local.get $4 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub i32.add @@ -7664,7 +7660,7 @@ local.get $15 local.get $4 i32.const 1 - i32.shr_s + i32.shr_u i32.const 536870912 i32.or i32.const 524288 @@ -7800,7 +7796,7 @@ block $folding-inner0 local.get $14 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $12 i32.const 1083179008 @@ -7825,7 +7821,7 @@ i32.const 2147483647 i32.and i32.const 1083231232 - i32.ge_s + i32.ge_u i32.const 0 local.get $5 local.get $12 @@ -7846,7 +7842,7 @@ i32.and local.tee $11 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub local.set $5 @@ -7863,17 +7859,17 @@ local.get $5 i32.const 1 i32.add - i32.shr_s + i32.shr_u i32.add local.tee $11 i32.const 2147483647 i32.and i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub local.tee $5 - i32.shr_s + i32.shr_u i32.const -1 i32.xor local.get $11 @@ -7892,7 +7888,7 @@ i32.const 20 local.get $5 i32.sub - i32.shr_s + i32.shr_u local.tee $6 i32.sub local.get $6 @@ -7980,7 +7976,7 @@ local.tee $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.get $6 i32.const 20 @@ -7988,9 +7984,9 @@ i32.add local.tee $5 i32.const 20 - i32.shr_s + i32.shr_u i32.const 0 - i32.le_s + i32.le_u if (result f64) local.get $0 local.get $6 @@ -8135,7 +8131,7 @@ i32.const 0 local.get $4 i32.const 31 - i32.shr_u + i32.shr_s local.tee $4 select if @@ -8183,7 +8179,7 @@ i32.const 2139095040 local.get $5 i32.const 31 - i32.shr_u + i32.shr_s select else local.get $4 @@ -8198,7 +8194,7 @@ i64.const 4604544271217802189 i64.sub i64.const 52 - i64.shr_s + i64.shr_u local.set $7 local.get $10 local.get $7 @@ -8311,7 +8307,7 @@ i32.const 0 local.get $5 i32.const 31 - i32.shr_u + i32.shr_s select end end @@ -8331,21 +8327,21 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor i64.const -49064778989728563 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor i64.const -4265267296055464877 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor ) (func $~lib/math/splitMix32 (param $0 i32) (result i32) @@ -8355,7 +8351,7 @@ local.tee $0 local.get $0 i32.const 15 - i32.shr_u + i32.shr_s i32.xor local.get $0 i32.const 1 @@ -8369,7 +8365,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_u + i32.shr_s i32.xor i32.mul i32.add @@ -8377,7 +8373,7 @@ local.tee $0 local.get $0 i32.const 14 - i32.shr_u + i32.shr_s i32.xor ) (func $~lib/math/NativeMath.seedRandom (param $0 i64) @@ -8495,7 +8491,7 @@ i64.reinterpret_f64 local.tee $4 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $5 @@ -8503,7 +8499,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $7 i32.const 1 @@ -8513,7 +8509,7 @@ i32.const 1 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.tee $3 @@ -8560,8 +8556,6 @@ i64.shl else local.get $2 - i64.const 4503599627370495 - i64.and i64.const 4503599627370496 i64.or end @@ -8584,8 +8578,6 @@ i64.shl else local.get $4 - i64.const 4503599627370495 - i64.and i64.const 4503599627370496 i64.or end @@ -8692,7 +8684,7 @@ i64.sub i64.const 1 i64.add - i64.shr_u + i64.shr_s local.get $3 i64.const 0 i64.gt_s @@ -8752,7 +8744,7 @@ i32.reinterpret_f32 local.tee $6 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $8 @@ -8760,7 +8752,7 @@ i32.reinterpret_f32 local.tee $3 i32.const 31 - i32.shr_u + i32.shr_s local.set $5 i32.const 1 local.get $1 @@ -8769,7 +8761,7 @@ local.get $3 local.tee $2 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.tee $9 @@ -8801,8 +8793,6 @@ local.get $9 if (result i32) local.get $2 - i32.const 8388607 - i32.and i32.const 8388608 i32.or else @@ -8822,8 +8812,6 @@ local.get $8 if (result i32) local.get $6 - i32.const 8388607 - i32.and i32.const 8388608 i32.or else @@ -8939,7 +8927,7 @@ i32.const 1 local.get $9 i32.sub - i32.shr_u + i32.shr_s local.get $9 i32.const 0 i32.gt_s @@ -8998,11 +8986,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $5 i32.const 31 - i32.shr_u + i32.shr_s local.set $6 local.get $5 i32.const 2147483647 @@ -9066,7 +9054,7 @@ block $~lib/math/rempio2|inlined.1 (result i32) local.get $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -9076,7 +9064,7 @@ if local.get $5 i32.const 20 - i32.shr_u + i32.shr_s local.tee $6 local.get $0 local.get $0 @@ -9096,10 +9084,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -9129,10 +9117,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -9339,7 +9327,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_u + i32.shr_s local.set $11 local.get $1 i32.const 2147483647 @@ -9424,12 +9412,12 @@ end local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 152 i32.sub local.tee $1 i32.const 6 - i32.shr_s + i32.shr_u i32.const 3 i32.shl i32.const 1256 @@ -9458,14 +9446,14 @@ i64.const 96 local.get $5 i64.sub - i64.shr_u + i64.shr_s i64.or else local.get $8 i64.const 32 local.get $5 i64.sub - i64.shr_u + i64.shr_s end local.set $12 f64.const 8.515303950216386e-20 @@ -9486,14 +9474,14 @@ i64.const 64 local.get $5 i64.sub - i64.shr_u + i64.shr_s i64.or i64.mul local.get $9 local.get $12 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 2 @@ -9505,10 +9493,10 @@ i32.const 0 local.get $7 i64.const 62 - i64.shr_u + i64.shr_s local.get $9 i64.const 63 - i64.shr_u + i64.shr_s i64.add i32.wrap_i64 local.tee $1 @@ -9800,13 +9788,13 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $6 i32.const 2147483647 i32.and i32.const 1072010280 - i32.ge_s + i32.ge_u local.tee $7 if f64.const 0.7853981633974483 @@ -9907,7 +9895,7 @@ f64.const 1 local.get $6 i32.const 30 - i32.shr_s + i32.shr_u i32.const 2 i32.and f64.convert_i32_s @@ -9981,18 +9969,18 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $4 i32.const 31 - i32.shr_u + i32.shr_s local.set $6 local.get $4 i32.const 2147483647 i32.and local.tee $4 i32.const 1072243195 - i32.le_s + i32.le_u if local.get $4 i32.const 1044381696 @@ -10019,7 +10007,7 @@ block $~lib/math/rempio2|inlined.2 (result i32) local.get $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -10029,7 +10017,7 @@ if local.get $4 i32.const 20 - i32.shr_u + i32.shr_s local.tee $6 local.get $0 local.get $0 @@ -10049,10 +10037,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -10082,10 +10070,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -10182,7 +10170,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_u + i32.shr_s local.set $11 local.get $1 i32.const 2147483647 @@ -10276,12 +10264,12 @@ end local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 152 i32.sub local.tee $1 i32.const 6 - i32.shr_s + i32.shr_u i32.const 3 i32.shl i32.const 1256 @@ -10310,14 +10298,14 @@ i64.const 96 local.get $6 i64.sub - i64.shr_u + i64.shr_s i64.or else local.get $8 i64.const 32 local.get $6 i64.sub - i64.shr_u + i64.shr_s end local.set $12 f64.const 8.515303950216386e-20 @@ -10338,14 +10326,14 @@ i64.const 64 local.get $6 i64.sub - i64.shr_u + i64.shr_s i64.or i64.mul local.get $9 local.get $12 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 2 @@ -10357,10 +10345,10 @@ i32.const 0 local.get $7 i64.const 62 - i64.shr_u + i64.shr_s local.get $9 i64.const 63 - i64.shr_u + i64.shr_s i64.add i32.wrap_i64 local.tee $1 @@ -10631,11 +10619,11 @@ i64.reinterpret_f64 local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $5 i32.const 31 - i32.shr_u + i32.shr_s local.set $6 local.get $5 i32.const 2147483647 @@ -10754,7 +10742,7 @@ block $~lib/math/rempio2|inlined.3 (result i32) local.get $3 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -10764,7 +10752,7 @@ if local.get $5 i32.const 20 - i32.shr_u + i32.shr_s local.tee $6 local.get $0 local.get $0 @@ -10784,10 +10772,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -10817,10 +10805,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -11091,7 +11079,7 @@ local.set $2 local.get $1 i64.const 1 - i64.shr_u + i64.shr_s local.set $1 local.get $0 local.get $0 @@ -11120,7 +11108,7 @@ local.set $2 local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -38266,17 +38254,17 @@ local.tee $2 local.get $2 i64.const 17 - i64.shr_u + i64.shr_s i64.xor i64.xor local.get $3 i64.const 26 - i64.shr_u + i64.shr_s i64.xor global.set $~lib/math/random_state1_64 local.get $3 i64.const 12 - i64.shr_u + i64.shr_s i64.const 4607182418800017408 i64.or f64.reinterpret_i64 @@ -38350,7 +38338,7 @@ i32.const 5 i32.mul i32.const 9 - i32.shr_u + i32.shr_s i32.const 1065353216 i32.or f32.reinterpret_i32 @@ -48383,8 +48371,10 @@ i32.const 1 i32.const 3 call $~lib/math/ipow32 - i32.const 255 - i32.and + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u i32.const 1 i32.ne if @@ -48398,9 +48388,11 @@ i32.const -2 i32.const 3 call $~lib/math/ipow32 - i32.const 255 - i32.and - i32.const 248 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u + i32.const -8 i32.ne if i32.const 0 diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 33c9a4432c..bbaf893b92 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -133,7 +133,7 @@ local.set $1 local.get $1 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and i32.wrap_i64 @@ -268,7 +268,7 @@ local.get $3 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -278,7 +278,7 @@ local.get $3 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -363,7 +363,7 @@ local.set $1 local.get $1 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $2 @@ -496,7 +496,7 @@ local.get $3 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne local.get $1 @@ -504,7 +504,7 @@ local.get $3 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne i32.eq @@ -700,7 +700,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $1 local.get $1 @@ -725,7 +725,7 @@ if local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if f64.const 2 f64.const 1.5707963267948966 @@ -775,7 +775,7 @@ end local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if f64.const 0.5 local.get $0 @@ -914,7 +914,7 @@ if local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if f32.const 2 f32.const 1.570796251296997 @@ -962,7 +962,7 @@ end local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if f32.const 0.5 local.get $0 @@ -1058,7 +1058,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 i32.const 1 @@ -1075,7 +1075,7 @@ else local.get $2 i32.const 31 - i32.shr_u + i32.shr_s end if local.get $2 @@ -1138,7 +1138,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $6 local.get $6 @@ -1149,7 +1149,7 @@ local.set $6 local.get $6 i32.const 20 - i32.shr_u + i32.shr_s i32.const 1023 i32.sub local.set $3 @@ -1419,7 +1419,7 @@ end local.get $2 i64.const 48 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $12 local.get $12 @@ -1493,14 +1493,14 @@ i64.const 52 i64.const 7 i64.sub - i64.shr_u + i64.shr_s i64.const 127 i64.and i32.wrap_i64 local.set $14 local.get $13 i64.const 52 - i64.shr_s + i64.shr_u local.set $15 local.get $2 local.get $13 @@ -1617,7 +1617,7 @@ local.get $0 i64.reinterpret_f64 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $1 @@ -1732,7 +1732,7 @@ else local.get $1 i32.const 31 - i32.shr_u + i32.shr_s end if local.get $1 @@ -1803,7 +1803,7 @@ local.set $6 local.get $6 i32.const 23 - i32.shr_u + i32.shr_s i32.const 127 i32.sub local.set $4 @@ -1962,7 +1962,7 @@ end local.get $2 i32.const 31 - i32.shr_u + i32.shr_s if (result i32) i32.const 1 else @@ -2002,13 +2002,13 @@ i32.const 23 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 15 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_s + i32.shr_u local.set $5 local.get $2 local.get $3 @@ -2166,7 +2166,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $1 local.get $1 @@ -2305,7 +2305,7 @@ end local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if local.get $0 f64.neg @@ -2446,7 +2446,7 @@ local.set $1 local.get $1 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $2 @@ -2645,7 +2645,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $1 local.get $0 @@ -3161,7 +3161,7 @@ local.set $1 local.get $1 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $2 @@ -3336,7 +3336,7 @@ local.set $2 local.get $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $3 local.get $2 @@ -3347,7 +3347,7 @@ local.set $2 local.get $2 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $5 local.get $2 @@ -3367,12 +3367,12 @@ end local.get $5 i32.const 31 - i32.shr_u + i32.shr_s i32.const 1 i32.and local.get $3 i32.const 30 - i32.shr_u + i32.shr_s i32.const 2 i32.and i32.or @@ -3674,12 +3674,12 @@ end local.get $3 i32.const 31 - i32.shr_u + i32.shr_s i32.const 1 i32.and local.get $2 i32.const 30 - i32.shr_u + i32.shr_s i32.const 2 i32.and i32.or @@ -3931,7 +3931,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -3956,7 +3956,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -4292,7 +4292,7 @@ local.set $2 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 1045 i64.sub local.set $3 @@ -4303,7 +4303,7 @@ i32.const 4408 local.get $3 i64.const 6 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 3 i32.shl @@ -4332,7 +4332,7 @@ local.set $13 local.get $10 local.get $12 - i64.shr_u + i64.shr_s local.get $9 local.get $4 i64.shl @@ -4340,7 +4340,7 @@ local.set $6 local.get $11 local.get $12 - i64.shr_u + i64.shr_s local.get $10 local.get $4 i64.shl @@ -4348,7 +4348,7 @@ local.set $7 local.get $13 local.get $12 - i64.shr_u + i64.shr_s local.get $11 local.get $4 i64.shl @@ -4382,11 +4382,11 @@ local.set $16 local.get $13 i64.const 32 - i64.shr_u + i64.shr_s local.set $13 local.get $12 i64.const 32 - i64.shr_u + i64.shr_s local.set $12 local.get $15 local.get $16 @@ -4401,12 +4401,12 @@ i64.mul local.get $19 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $19 local.get $19 i64.const 32 - i64.shr_u + i64.shr_s local.set $18 local.get $15 local.get $12 @@ -4423,7 +4423,7 @@ i64.add local.get $19 i64.const 32 - i64.shr_u + i64.shr_s i64.add global.set $~lib/math/res128_hi local.get $19 @@ -4440,10 +4440,10 @@ local.set $22 local.get $8 i64.const 32 - i64.shr_u + i64.shr_s local.get $14 i64.const 32 - i64.shr_s + i64.shr_u i64.mul local.set $23 local.get $20 @@ -4468,20 +4468,20 @@ i64.shl local.get $24 i64.const 62 - i64.shr_u + i64.shr_s i64.or local.set $27 local.get $27 i64.const 63 - i64.shr_s + i64.shr_u local.set $28 local.get $28 i64.const 1 - i64.shr_s + i64.shr_u local.set $29 local.get $25 i64.const 62 - i64.shr_s + i64.shr_u local.get $28 i64.sub local.set $30 @@ -4504,7 +4504,7 @@ i64.const 64 local.get $19 i64.sub - i64.shr_u + i64.shr_s i64.or local.set $12 local.get $13 @@ -4525,11 +4525,11 @@ local.set $17 local.get $16 i64.const 32 - i64.shr_u + i64.shr_s local.set $16 local.get $15 i64.const 32 - i64.shr_u + i64.shr_s local.set $15 local.get $18 local.get $17 @@ -4544,12 +4544,12 @@ i64.mul local.get $33 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $33 local.get $33 i64.const 32 - i64.shr_u + i64.shr_s local.set $32 local.get $18 local.get $15 @@ -4566,7 +4566,7 @@ i64.add local.get $33 i64.const 32 - i64.shr_u + i64.shr_s i64.add global.set $~lib/math/res128_hi local.get $33 @@ -4579,11 +4579,11 @@ local.set $32 local.get $32 i64.const 11 - i64.shr_u + i64.shr_s local.set $31 local.get $33 i64.const 11 - i64.shr_u + i64.shr_s local.get $32 i64.const 53 i64.shl @@ -4673,12 +4673,12 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 local.get $2 i32.const 31 - i32.shr_u + i32.shr_s local.set $3 local.get $2 i32.const 2147483647 @@ -4776,7 +4776,7 @@ local.set $10 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -4894,7 +4894,7 @@ local.set $9 local.get $12 i32.const 20 - i32.shr_u + i32.shr_s local.set $13 local.get $8 local.get $9 @@ -4903,13 +4903,13 @@ local.get $6 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -4945,13 +4945,13 @@ local.get $6 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -5226,7 +5226,7 @@ local.set $1 local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $1 i32.const 2147483647 @@ -5612,7 +5612,7 @@ local.set $11 local.get $11 i32.const 23 - i32.shr_s + i32.shr_u i32.const 152 i32.sub local.set $13 @@ -5624,7 +5624,7 @@ i32.const 4600 local.get $13 i32.const 6 - i32.shr_s + i32.shr_u i32.const 3 i32.shl i32.add @@ -5646,7 +5646,7 @@ i64.const 96 local.get $14 i64.sub - i64.shr_u + i64.shr_s local.set $18 local.get $18 local.get $17 @@ -5661,14 +5661,14 @@ i64.const 32 local.get $14 i64.sub - i64.shr_u + i64.shr_s local.set $18 end local.get $17 i64.const 64 local.get $14 i64.sub - i64.shr_u + i64.shr_s local.get $16 local.get $14 i64.shl @@ -5688,7 +5688,7 @@ local.get $18 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $21 local.get $21 @@ -5697,10 +5697,10 @@ local.set $22 local.get $21 i64.const 62 - i64.shr_u + i64.shr_s local.get $22 i64.const 63 - i64.shr_u + i64.shr_s i64.add i32.wrap_i64 local.set $23 @@ -5841,7 +5841,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i64.const 2147483647 i64.and i32.wrap_i64 @@ -5850,7 +5850,7 @@ local.set $3 local.get $1 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $4 local.get $2 @@ -6167,7 +6167,7 @@ local.set $2 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and i32.wrap_i64 @@ -6211,7 +6211,7 @@ f64.const inf local.get $2 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne select @@ -6434,7 +6434,7 @@ local.set $0 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 local.get $2 @@ -6561,7 +6561,7 @@ local.set $2 local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.set $3 local.get $2 i32.const 1100331076 @@ -6857,7 +6857,7 @@ local.set $3 local.get $3 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and local.set $4 @@ -7036,7 +7036,7 @@ i32.const 127 i32.const 235 i32.const 1 - i32.shr_u + i32.shr_s i32.add i32.const 23 i32.shl @@ -7153,7 +7153,7 @@ local.set $2 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and i32.wrap_i64 @@ -7195,7 +7195,7 @@ end local.get $2 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.eqz @@ -7439,7 +7439,7 @@ local.set $3 local.get $3 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and local.set $4 @@ -7627,12 +7627,12 @@ end local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $5 local.get $3 i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $6 local.get $3 @@ -7989,7 +7989,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 i32.const 0 @@ -8002,7 +8002,7 @@ else local.get $2 i32.const 31 - i32.shr_u + i32.shr_s end if local.get $1 @@ -8020,7 +8020,7 @@ end local.get $2 i32.const 31 - i32.shr_u + i32.shr_s if local.get $0 local.get $0 @@ -8042,7 +8042,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 else @@ -8080,7 +8080,7 @@ local.get $3 local.get $2 i32.const 20 - i32.shr_u + i32.shr_s i32.const 1023 i32.sub i32.add @@ -8277,7 +8277,7 @@ else local.get $1 i32.const 31 - i32.shr_u + i32.shr_s end if local.get $1 @@ -8295,7 +8295,7 @@ end local.get $1 i32.const 31 - i32.shr_u + i32.shr_s if local.get $0 local.get $0 @@ -8341,7 +8341,7 @@ local.get $2 local.get $1 i32.const 23 - i32.shr_u + i32.shr_s i32.const 127 i32.sub i32.add @@ -8627,7 +8627,7 @@ end local.get $2 i64.const 48 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $12 local.get $12 @@ -8700,14 +8700,14 @@ i64.const 52 i64.const 6 i64.sub - i64.shr_u + i64.shr_s i64.const 63 i64.and i32.wrap_i64 local.set $14 local.get $13 i64.const 52 - i64.shr_s + i64.shr_u local.set $15 local.get $2 local.get $13 @@ -8918,7 +8918,7 @@ end local.get $2 i32.const 31 - i32.shr_u + i32.shr_s if (result i32) i32.const 1 else @@ -8958,7 +8958,7 @@ i32.const 23 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 15 i32.and local.set $4 @@ -8972,7 +8972,7 @@ local.set $6 local.get $3 i32.const 23 - i32.shr_s + i32.shr_u local.set $7 i32.const 8984 local.get $4 @@ -9174,19 +9174,19 @@ local.set $3 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $4 local.get $3 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $5 local.get $2 i64.const 63 - i64.shr_u + i64.shr_s local.set $6 local.get $3 i64.const 1 @@ -9263,7 +9263,7 @@ local.get $2 i64.const -1 i64.const 12 - i64.shr_u + i64.shr_s i64.and local.set $2 local.get $2 @@ -9297,7 +9297,7 @@ local.get $3 i64.const -1 i64.const 12 - i64.shr_u + i64.shr_s i64.and local.set $3 local.get $3 @@ -9397,7 +9397,7 @@ i64.sub i64.const 1 i64.add - i64.shr_u + i64.shr_s local.set $2 end local.get $2 @@ -9467,13 +9467,13 @@ local.set $3 local.get $2 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $5 @@ -9554,7 +9554,7 @@ local.get $2 i32.const -1 i32.const 9 - i32.shr_u + i32.shr_s i32.and local.set $2 local.get $2 @@ -9586,7 +9586,7 @@ local.get $3 i32.const -1 i32.const 9 - i32.shr_u + i32.shr_s i32.and local.set $3 local.get $3 @@ -9686,7 +9686,7 @@ i32.sub i32.const 1 i32.add - i32.shr_u + i32.shr_s local.set $2 end local.get $2 @@ -9821,11 +9821,11 @@ local.set $6 local.get $5 i64.const 52 - i64.shr_u + i64.shr_s local.set $7 local.get $6 i64.const 52 - i64.shr_u + i64.shr_s local.set $8 local.get $7 i64.const 1 @@ -9912,7 +9912,7 @@ i64.lt_u local.get $6 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.eqz @@ -9944,7 +9944,7 @@ local.set $10 local.get $5 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 if (result i32) block $~lib/util/math/checkint|inlined.0 (result i32) @@ -9952,7 +9952,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $11 @@ -10014,7 +10014,7 @@ end local.get $6 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne if (result f64) @@ -10028,7 +10028,7 @@ end local.get $5 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne if @@ -10037,7 +10037,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $11 @@ -10188,14 +10188,14 @@ i64.const 52 i64.const 7 i64.sub - i64.shr_u + i64.shr_s i64.const 127 i64.and i32.wrap_i64 local.set $12 local.get $11 i64.const 52 - i64.shr_s + i64.shr_u local.set $13 local.get $9 local.get $11 @@ -10414,7 +10414,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2047 i32.and @@ -10443,7 +10443,7 @@ if local.get $9 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne if (result f64) @@ -10894,7 +10894,7 @@ i32.lt_u local.get $6 i32.const 31 - i32.shr_u + i32.shr_s i32.eqz i32.eq if @@ -10926,14 +10926,14 @@ local.set $9 local.get $5 i32.const 31 - i32.shr_u + i32.shr_s if (result i32) block $~lib/util/math/checkintf|inlined.0 (result i32) local.get $6 local.set $8 local.get $8 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $10 @@ -10991,7 +10991,7 @@ end local.get $6 i32.const 31 - i32.shr_u + i32.shr_s if (result f32) f32.const 1 local.get $9 @@ -11003,14 +11003,14 @@ end local.get $5 i32.const 31 - i32.shr_u + i32.shr_s if block $~lib/util/math/checkintf|inlined.1 (result i32) local.get $6 local.set $8 local.get $8 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $10 @@ -11113,7 +11113,7 @@ i32.const 23 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 15 i32.and local.set $11 @@ -11127,7 +11127,7 @@ local.set $13 local.get $12 i32.const 23 - i32.shr_s + i32.shr_u local.set $14 i32.const 8984 local.get $11 @@ -11208,7 +11208,7 @@ local.get $21 i64.reinterpret_f64 i64.const 47 - i64.shr_u + i64.shr_s i64.const 65535 i64.and i64.const 32959 @@ -11338,7 +11338,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -11348,7 +11348,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -11358,7 +11358,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -11371,7 +11371,7 @@ local.get $0 local.get $0 i32.const 15 - i32.shr_u + i32.shr_s i32.xor local.get $0 i32.const 1 @@ -11383,7 +11383,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_u + i32.shr_s i32.xor local.get $0 i32.const 61 @@ -11395,7 +11395,7 @@ local.get $0 local.get $0 i32.const 14 - i32.shr_u + i32.shr_s i32.xor ) (func $~lib/math/NativeMath.seedRandom (param $0 i64) @@ -11476,7 +11476,7 @@ local.get $0 local.get $0 i64.const 17 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -11486,14 +11486,14 @@ local.get $0 local.get $1 i64.const 26 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 global.set $~lib/math/random_state1_64 local.get $1 i64.const 12 - i64.shr_u + i64.shr_s i64.const 4607182418800017408 i64.or local.set $2 @@ -11548,7 +11548,7 @@ global.set $~lib/math/random_state1_32 local.get $3 i32.const 9 - i32.shr_u + i32.shr_s i32.const 127 i32.const 23 i32.shl @@ -11685,19 +11685,19 @@ local.set $3 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $4 local.get $3 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $5 local.get $2 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $6 local.get $3 @@ -11764,7 +11764,7 @@ local.get $8 i64.const -1 i64.const 12 - i64.shr_u + i64.shr_s i64.and local.set $8 local.get $8 @@ -11798,7 +11798,7 @@ local.get $3 i64.const -1 i64.const 12 - i64.shr_u + i64.shr_s i64.and local.set $3 local.get $3 @@ -11923,7 +11923,7 @@ i64.sub i64.const 1 i64.add - i64.shr_u + i64.shr_s local.set $8 end local.get $8 @@ -12010,19 +12010,19 @@ local.set $3 local.get $2 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $5 local.get $2 i32.const 31 - i32.shr_u + i32.shr_s local.set $6 local.get $2 local.set $7 @@ -12086,7 +12086,7 @@ local.get $7 i32.const -1 i32.const 9 - i32.shr_u + i32.shr_s i32.and local.set $7 local.get $7 @@ -12118,7 +12118,7 @@ local.get $3 i32.const -1 i32.const 9 - i32.shr_u + i32.shr_s i32.and local.set $3 local.get $3 @@ -12243,7 +12243,7 @@ i32.sub i32.const 1 i32.add - i32.shr_u + i32.shr_s local.set $7 end local.get $7 @@ -12337,12 +12337,12 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 local.get $2 i32.const 31 - i32.shr_u + i32.shr_s local.set $3 local.get $2 i32.const 2147483647 @@ -12453,7 +12453,7 @@ local.set $4 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -12571,7 +12571,7 @@ local.set $10 local.get $12 i32.const 20 - i32.shr_u + i32.shr_s local.set $13 local.get $9 local.get $10 @@ -12580,13 +12580,13 @@ local.get $7 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -12622,13 +12622,13 @@ local.get $7 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -12901,7 +12901,7 @@ local.set $1 local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $1 i32.const 2147483647 @@ -13281,7 +13281,7 @@ local.set $11 local.get $11 i32.const 23 - i32.shr_s + i32.shr_u i32.const 152 i32.sub local.set $13 @@ -13293,7 +13293,7 @@ i32.const 4600 local.get $13 i32.const 6 - i32.shr_s + i32.shr_u i32.const 3 i32.shl i32.add @@ -13315,7 +13315,7 @@ i64.const 96 local.get $14 i64.sub - i64.shr_u + i64.shr_s local.set $18 local.get $18 local.get $17 @@ -13330,14 +13330,14 @@ i64.const 32 local.get $14 i64.sub - i64.shr_u + i64.shr_s local.set $18 end local.get $17 i64.const 64 local.get $14 i64.sub - i64.shr_u + i64.shr_s local.get $16 local.get $14 i64.shl @@ -13357,7 +13357,7 @@ local.get $18 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $21 local.get $21 @@ -13366,10 +13366,10 @@ local.set $22 local.get $21 i64.const 62 - i64.shr_u + i64.shr_s local.get $22 i64.const 63 - i64.shr_u + i64.shr_s i64.add i32.wrap_i64 local.set $23 @@ -13505,7 +13505,7 @@ local.set $2 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $3 f64.const 0.5 @@ -13689,7 +13689,7 @@ i32.const 127 i32.const 235 i32.const 1 - i32.shr_u + i32.shr_s i32.add i32.const 23 i32.shl @@ -13766,7 +13766,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $8 local.get $8 @@ -13893,7 +13893,7 @@ f64.const 1 local.get $8 i32.const 30 - i32.shr_s + i32.shr_u i32.const 2 i32.and f64.convert_i32_s @@ -13988,12 +13988,12 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 local.get $2 i32.const 31 - i32.shr_u + i32.shr_s local.set $3 local.get $2 i32.const 2147483647 @@ -14034,7 +14034,7 @@ local.set $4 local.get $5 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -14152,7 +14152,7 @@ local.set $9 local.get $7 i32.const 20 - i32.shr_u + i32.shr_s local.set $8 local.get $10 local.get $9 @@ -14161,13 +14161,13 @@ local.get $12 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $13 local.get $8 local.get $13 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -14203,13 +14203,13 @@ local.get $12 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $13 local.get $8 local.get $13 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -14338,7 +14338,7 @@ local.set $1 local.get $1 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $1 i32.const 2147483647 @@ -14781,7 +14781,7 @@ local.set $13 local.get $13 i32.const 23 - i32.shr_s + i32.shr_u i32.const 152 i32.sub local.set $15 @@ -14793,7 +14793,7 @@ i32.const 4600 local.get $15 i32.const 6 - i32.shr_s + i32.shr_u i32.const 3 i32.shl i32.add @@ -14815,7 +14815,7 @@ i64.const 96 local.get $16 i64.sub - i64.shr_u + i64.shr_s local.set $20 local.get $20 local.get $19 @@ -14830,14 +14830,14 @@ i64.const 32 local.get $16 i64.sub - i64.shr_u + i64.shr_s local.set $20 end local.get $19 i64.const 64 local.get $16 i64.sub - i64.shr_u + i64.shr_s local.get $18 local.get $16 i64.shl @@ -14857,7 +14857,7 @@ local.get $20 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $23 @@ -14866,10 +14866,10 @@ local.set $24 local.get $23 i64.const 62 - i64.shr_u + i64.shr_s local.get $24 i64.const 63 - i64.shr_u + i64.shr_s i64.add i32.wrap_i64 local.set $25 @@ -14981,7 +14981,7 @@ local.set $2 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $3 local.get $3 @@ -15241,12 +15241,12 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 local.get $2 i32.const 31 - i32.shr_u + i32.shr_s local.set $3 local.get $2 i32.const 2147483647 @@ -15428,7 +15428,7 @@ local.set $4 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 2147483647 i32.and @@ -15546,7 +15546,7 @@ local.set $7 local.get $12 i32.const 20 - i32.shr_u + i32.shr_s local.set $13 local.get $8 local.get $7 @@ -15555,13 +15555,13 @@ local.get $10 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -15597,13 +15597,13 @@ local.get $10 i64.reinterpret_f64 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_u + i32.shr_s i32.const 2047 i32.and i32.sub @@ -15889,7 +15889,7 @@ local.set $2 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $3 @@ -15935,7 +15935,7 @@ local.set $4 local.get $4 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $1 i32.const 0 @@ -15944,7 +15944,7 @@ local.get $1 local.get $2 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne select @@ -16105,7 +16105,7 @@ end local.get $1 i64.const 1 - i64.shr_u + i64.shr_s local.set $1 local.get $0 local.get $0 @@ -16125,7 +16125,7 @@ end local.get $1 i64.const 1 - i64.shr_u + i64.shr_s local.set $1 local.get $0 local.get $0 @@ -16145,7 +16145,7 @@ end local.get $1 i64.const 1 - i64.shr_u + i64.shr_s local.set $1 local.get $0 local.get $0 @@ -16165,7 +16165,7 @@ end local.get $1 i64.const 1 - i64.shr_u + i64.shr_s local.set $1 local.get $0 local.get $0 @@ -16185,7 +16185,7 @@ end local.get $1 i64.const 1 - i64.shr_u + i64.shr_s local.set $1 local.get $0 local.get $0 @@ -16230,7 +16230,7 @@ end local.get $1 i64.const 1 - i64.shr_u + i64.shr_s local.set $1 local.get $0 local.get $0 @@ -16342,7 +16342,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -16360,7 +16360,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -16378,7 +16378,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -16396,7 +16396,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -16435,7 +16435,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -48452,7 +48452,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -48465,7 +48465,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -48478,7 +48478,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -48491,7 +48491,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -48504,7 +48504,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -48518,7 +48518,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -48531,7 +48531,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -48545,7 +48545,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 @@ -48558,7 +48558,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne i32.const 0 @@ -48569,7 +48569,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne i32.const 1 @@ -48580,7 +48580,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne i32.const 0 @@ -48591,7 +48591,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne i32.const 1 @@ -48602,7 +48602,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne i32.const 0 @@ -48614,7 +48614,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne i32.const 1 @@ -48625,7 +48625,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne i32.const 0 @@ -48637,7 +48637,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_u + i32.shr_s i32.const 0 i32.ne i32.const 1 @@ -59021,7 +59021,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 1 i32.eq i32.eqz @@ -59039,7 +59039,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const -8 i32.eq i32.eqz diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 74e16f90d7..135cc0b78f 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -38,7 +38,7 @@ i64.reinterpret_f64 local.tee $3 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $5 @@ -46,7 +46,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 63 - i64.shr_u + i64.shr_s local.set $7 i32.const 1 local.get $1 @@ -55,7 +55,7 @@ i32.const 1 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.tee $4 @@ -110,8 +110,6 @@ i64.shl else local.get $2 - i64.const 4503599627370495 - i64.and i64.const 4503599627370496 i64.or end @@ -134,8 +132,6 @@ i64.shl else local.get $3 - i64.const 4503599627370495 - i64.and i64.const 4503599627370496 i64.or end @@ -211,7 +207,7 @@ i64.sub i64.const 1 i64.add - i64.shr_u + i64.shr_s end local.get $7 i64.const 63 @@ -292,7 +288,7 @@ i32.reinterpret_f32 local.tee $3 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $5 @@ -308,7 +304,7 @@ f32.ne local.get $2 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.tee $4 @@ -348,8 +344,6 @@ local.get $4 if (result i32) local.get $2 - i32.const 8388607 - i32.and i32.const 8388608 i32.or else @@ -369,8 +363,6 @@ local.get $5 if (result i32) local.get $3 - i32.const 8388607 - i32.and i32.const 8388608 i32.or else @@ -456,7 +448,7 @@ i32.const 1 local.get $4 i32.sub - i32.shr_u + i32.shr_s end local.get $7 i32.or diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index 942c93ec43..f8a50aa068 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -48,19 +48,19 @@ local.set $3 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $4 local.get $3 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $5 local.get $2 i64.const 63 - i64.shr_u + i64.shr_s local.set $6 local.get $3 i64.const 1 @@ -137,7 +137,7 @@ local.get $2 i64.const -1 i64.const 12 - i64.shr_u + i64.shr_s i64.and local.set $2 local.get $2 @@ -171,7 +171,7 @@ local.get $3 i64.const -1 i64.const 12 - i64.shr_u + i64.shr_s i64.and local.set $3 local.get $3 @@ -271,7 +271,7 @@ i64.sub i64.const 1 i64.add - i64.shr_u + i64.shr_s local.set $2 end local.get $2 @@ -365,13 +365,13 @@ local.set $3 local.get $2 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $5 @@ -452,7 +452,7 @@ local.get $2 i32.const -1 i32.const 9 - i32.shr_u + i32.shr_s i32.and local.set $2 local.get $2 @@ -484,7 +484,7 @@ local.get $3 i32.const -1 i32.const 9 - i32.shr_u + i32.shr_s i32.and local.set $3 local.get $3 @@ -584,7 +584,7 @@ i32.sub i32.const 1 i32.add - i32.shr_u + i32.shr_s local.set $2 end local.get $2 diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index fed550f22d..197eb660fe 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -21,7 +21,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $0 local.get $1 local.get $0 diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index f68b606bcb..d68b376717 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -39,7 +39,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index 856757bab1..809bb31ad0 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -70,7 +70,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/std/object.untouched.wat b/tests/compiler/std/object.untouched.wat index 7bccb6132b..e0c2eb1eba 100644 --- a/tests/compiler/std/object.untouched.wat +++ b/tests/compiler/std/object.untouched.wat @@ -102,7 +102,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 49e1f223da..3f96a6d865 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -103,7 +103,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 @@ -171,7 +171,7 @@ local.set $2 local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -851,11 +851,11 @@ local.tee $0 i32.load i32.const 3 - i32.shr_s + i32.shr_u local.get $0 i32.load offset=4 i32.const 3 - i32.shr_s + i32.shr_u call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/sres global.get $std/operator-overloading/sres @@ -887,11 +887,11 @@ local.tee $0 i32.load i32.const 3 - i32.shr_u + i32.shr_s local.get $0 i32.load offset=4 i32.const 3 - i32.shr_u + i32.shr_s call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/ures global.get $std/operator-overloading/ures diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 3722cbd445..81ad16530e 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -108,7 +108,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -451,7 +451,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -469,7 +469,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -487,7 +487,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -505,7 +505,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -544,7 +544,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -846,11 +846,11 @@ local.get $0 i32.load local.get $1 - i32.shr_s + i32.shr_u local.get $0 i32.load offset=4 local.get $1 - i32.shr_s + i32.shr_u call $std/operator-overloading/Tester#constructor local.set $2 local.get $0 @@ -866,11 +866,11 @@ local.get $0 i32.load local.get $1 - i32.shr_u + i32.shr_s local.get $0 i32.load offset=4 local.get $1 - i32.shr_u + i32.shr_s call $std/operator-overloading/Tester#constructor local.set $2 local.get $0 diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index 7a407a2b77..af5ae64543 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -496,7 +496,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -512,7 +512,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -528,7 +528,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -544,7 +544,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -617,7 +617,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -633,7 +633,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -649,7 +649,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -665,7 +665,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -724,7 +724,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -740,7 +740,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -756,7 +756,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -772,7 +772,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/std/polyfills.untouched.wat b/tests/compiler/std/polyfills.untouched.wat index 966b7ef0aa..bf89d5f968 100644 --- a/tests/compiler/std/polyfills.untouched.wat +++ b/tests/compiler/std/polyfills.untouched.wat @@ -59,7 +59,7 @@ i32.const 65535 i32.and i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.or @@ -79,9 +79,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.or @@ -155,7 +155,7 @@ drop local.get $0 i64.const 8 - i64.shr_u + i64.shr_s i64.const 71777214294589695 i64.and local.set $1 @@ -171,7 +171,7 @@ local.set $3 local.get $3 i64.const 16 - i64.shr_u + i64.shr_s i64.const 281470681808895 i64.and local.set $1 @@ -208,7 +208,7 @@ drop local.get $0 i64.const 8 - i64.shr_u + i64.shr_s i64.const 71777214294589695 i64.and local.set $1 @@ -224,7 +224,7 @@ local.set $3 local.get $3 i64.const 16 - i64.shr_u + i64.shr_s i64.const 281470681808895 i64.and local.set $1 @@ -352,7 +352,7 @@ i32.const 65535 i32.and i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.or @@ -379,9 +379,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.or @@ -412,7 +412,7 @@ i32.and local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.or @@ -447,7 +447,7 @@ i32.and local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.or @@ -478,12 +478,12 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 170 i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -514,12 +514,12 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 48042 i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -628,12 +628,12 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 170 i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -664,12 +664,12 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 48042 i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eq i32.eqz if diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index efcadc7858..3517835159 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -86,7 +86,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -97,7 +97,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -387,7 +387,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -398,7 +398,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -714,7 +714,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -741,7 +741,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -973,7 +973,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1358,10 +1358,12 @@ i32.const 0 else local.get $0 - i32.load8_u + i32.load8_s local.get $1 - i32.const 255 - i32.and + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u i32.eq end if @@ -1385,7 +1387,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 call $~lib/set/Set#find i32.const 0 @@ -1529,7 +1531,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 local.tee $3 call $~lib/set/Set#find @@ -1905,13 +1907,13 @@ i32.load offset=8 local.tee $5 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 1200 @@ -2182,7 +2184,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 call $~lib/set/Set#find local.tee $1 @@ -2205,7 +2207,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 1 i32.add @@ -2282,9 +2284,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 100 - i32.lt_s + i32.lt_u if local.get $0 local.get $2 @@ -2339,9 +2341,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 100 - i32.lt_s + i32.lt_u if local.get $0 local.get $2 @@ -2448,9 +2450,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 50 - i32.lt_s + i32.lt_u if local.get $0 local.get $1 @@ -2504,9 +2506,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 50 - i32.lt_s + i32.lt_u if local.get $0 local.get $1 @@ -2615,6 +2617,49 @@ i32.store offset=20 local.get $0 ) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=4 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -2622,7 +2667,7 @@ i32.const 255 i32.and call $~lib/util/hash/hash8 - call $~lib/set/Set#find + call $~lib/set/Set#find i32.const 0 i32.ne ) @@ -2765,7 +2810,7 @@ i32.and call $~lib/util/hash/hash8 local.tee $3 - call $~lib/set/Set#find + call $~lib/set/Set#find i32.eqz if local.get $0 @@ -2979,7 +3024,7 @@ i32.const 255 i32.and call $~lib/util/hash/hash8 - call $~lib/set/Set#find + call $~lib/set/Set#find local.tee $1 i32.eqz if @@ -3000,7 +3045,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 1 i32.add @@ -3379,7 +3424,7 @@ i32.mul local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -3407,10 +3452,12 @@ i32.const 0 else local.get $0 - i32.load16_u + i32.load16_s local.get $1 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.eq end if @@ -3434,7 +3481,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 call $~lib/set/Set#find i32.const 0 @@ -3578,7 +3625,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 local.tee $3 call $~lib/set/Set#find @@ -3851,7 +3898,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 call $~lib/set/Set#find local.tee $1 @@ -3874,7 +3921,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 1 i32.add @@ -3918,9 +3965,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 100 - i32.lt_s + i32.lt_u if local.get $0 local.get $2 @@ -3975,9 +4022,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 100 - i32.lt_s + i32.lt_u if local.get $0 local.get $2 @@ -4084,9 +4131,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 50 - i32.lt_s + i32.lt_u if local.get $0 local.get $1 @@ -4140,9 +4187,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 50 - i32.lt_s + i32.lt_u if local.get $0 local.get $1 @@ -4251,6 +4298,49 @@ i32.store offset=20 local.get $0 ) + (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=4 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -4258,7 +4348,7 @@ i32.const 65535 i32.and call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#find i32.const 0 i32.ne ) @@ -4401,7 +4491,7 @@ i32.and call $~lib/util/hash/hash16 local.tee $3 - call $~lib/set/Set#find + call $~lib/set/Set#find i32.eqz if local.get $0 @@ -4621,7 +4711,7 @@ i32.const 65535 i32.and call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#find local.tee $1 i32.eqz if @@ -4642,7 +4732,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 1 i32.add @@ -5021,7 +5111,7 @@ i32.mul local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -5029,7 +5119,7 @@ i32.mul local.get $0 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -5037,7 +5127,7 @@ i32.mul local.get $0 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -5518,7 +5608,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 1 i32.add @@ -6338,7 +6428,7 @@ i32.mul local.get $1 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -6346,7 +6436,7 @@ i32.mul local.get $1 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -6354,13 +6444,13 @@ i32.mul local.get $1 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul local.get $0 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $1 i32.const 255 @@ -6370,7 +6460,7 @@ i32.mul local.get $1 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -6378,7 +6468,7 @@ i32.mul local.get $1 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -6386,7 +6476,7 @@ i32.mul local.get $1 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -6868,7 +6958,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 i32.const 1 i32.add @@ -8175,7 +8265,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 i32.const 1 i32.add @@ -9002,7 +9092,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 i32.const 1 i32.add diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index b867f31859..602231ec57 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -108,7 +108,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -120,7 +120,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -494,7 +494,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -506,7 +506,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -819,7 +819,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -983,7 +983,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1013,7 +1013,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1203,7 +1203,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1869,7 +1869,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq else i32.const 0 @@ -1911,7 +1911,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.0 end @@ -2103,7 +2103,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.1 end @@ -2223,7 +2223,7 @@ local.get $1 i32.const 1073741808 i32.const 0 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -2585,7 +2585,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2601,7 +2601,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2617,7 +2617,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2633,7 +2633,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2706,7 +2706,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2722,7 +2722,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2738,7 +2738,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2754,7 +2754,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2813,7 +2813,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2829,7 +2829,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2845,7 +2845,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2861,7 +2861,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -3735,13 +3735,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -3971,7 +3971,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.3 end @@ -4000,7 +4000,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -4099,7 +4099,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 100 i32.lt_s local.set $3 @@ -4161,7 +4161,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 100 i32.lt_s local.set $4 @@ -4279,7 +4279,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 50 i32.lt_s local.set $7 @@ -4341,7 +4341,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 50 i32.lt_s local.set $8 @@ -4854,7 +4854,7 @@ local.get $1 i32.const 1073741808 i32.const 0 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -5116,7 +5116,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -5598,7 +5598,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -5636,7 +5636,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eq else i32.const 0 @@ -5682,7 +5682,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.0 end @@ -5882,7 +5882,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.1 end @@ -6002,7 +6002,7 @@ local.get $1 i32.const 1073741808 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -6241,7 +6241,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.3 end @@ -6270,7 +6270,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -6369,7 +6369,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 100 i32.lt_s local.set $3 @@ -6431,7 +6431,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 100 i32.lt_s local.set $4 @@ -6549,7 +6549,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 50 i32.lt_s local.set $7 @@ -6611,7 +6611,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 50 i32.lt_s local.set $8 @@ -7136,7 +7136,7 @@ local.get $1 i32.const 1073741808 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -7402,7 +7402,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -7884,7 +7884,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -7894,7 +7894,7 @@ local.get $1 local.get $0 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -7904,7 +7904,7 @@ local.get $1 local.get $0 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -8308,7 +8308,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -8576,7 +8576,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -9428,7 +9428,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -9696,7 +9696,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -10160,7 +10160,7 @@ local.set $1 local.get $0 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 i32.const -2128831035 @@ -10176,7 +10176,7 @@ local.get $3 local.get $1 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -10186,7 +10186,7 @@ local.get $3 local.get $1 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -10196,7 +10196,7 @@ local.get $3 local.get $1 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -10212,7 +10212,7 @@ local.get $3 local.get $2 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -10222,7 +10222,7 @@ local.get $3 local.get $2 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -10232,7 +10232,7 @@ local.get $3 local.get $2 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -10650,7 +10650,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -10923,7 +10923,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -11790,7 +11790,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -12063,7 +12063,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -12897,7 +12897,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -13159,7 +13159,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 @@ -14005,7 +14005,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 192 @@ -14271,7 +14271,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_u + i32.shr_s local.set $4 local.get $4 i32.const 1 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 5a80874100..e7002f57aa 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -69,7 +69,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $1 local.get $2 local.get $1 @@ -583,13 +583,13 @@ i32.load offset=8 local.tee $2 local.get $1 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 1 i32.const 1073741808 local.get $1 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 1472 diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 40be734cf3..77a86692a2 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -98,7 +98,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -445,7 +445,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -461,7 +461,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -477,7 +477,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -493,7 +493,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -566,7 +566,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -582,7 +582,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -598,7 +598,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -614,7 +614,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -673,7 +673,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -689,7 +689,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -705,7 +705,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -721,7 +721,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -1783,13 +1783,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 464 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 9e5adce441..d216986867 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -36,7 +36,7 @@ i32.sub i32.load offset=12 i32.const 2 - i32.shr_u + i32.shr_s ) (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -120,7 +120,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -131,7 +131,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -421,7 +421,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -432,7 +432,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -724,7 +724,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -751,7 +751,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -1003,7 +1003,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 diff --git a/tests/compiler/std/staticarray.untouched.wat b/tests/compiler/std/staticarray.untouched.wat index b74ba95635..1194b82480 100644 --- a/tests/compiler/std/staticarray.untouched.wat +++ b/tests/compiler/std/staticarray.untouched.wat @@ -43,7 +43,7 @@ i32.sub i32.load offset=12 i32.const 2 - i32.shr_u + i32.shr_s ) (func $~lib/staticarray/StaticArray#__uget (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -167,7 +167,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -179,7 +179,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -553,7 +553,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -565,7 +565,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -878,7 +878,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1042,7 +1042,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1072,7 +1072,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1262,7 +1262,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1796,7 +1796,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1812,7 +1812,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1828,7 +1828,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1844,7 +1844,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1917,7 +1917,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1933,7 +1933,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -1949,7 +1949,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1965,7 +1965,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2024,7 +2024,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2040,7 +2040,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2056,7 +2056,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2072,7 +2072,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 242a26ef06..186f195b75 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -314,7 +314,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) @@ -412,7 +412,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -423,7 +423,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -713,7 +713,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -724,7 +724,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -1040,7 +1040,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -1067,7 +1067,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -1299,7 +1299,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1392,7 +1392,7 @@ (local $6 i32) local.get $0 i32.const 8 - i32.shr_u + i32.shr_s local.tee $2 i32.const 5672 i32.add @@ -1423,7 +1423,7 @@ i32.load i32.mul i32.const 11 - i32.shr_u + i32.shr_s i32.const 6 i32.rem_u i32.add @@ -1434,7 +1434,7 @@ i32.load local.tee $2 i32.const 8 - i32.shr_s + i32.shr_u local.set $3 block $folding-inner0 local.get $2 @@ -1450,7 +1450,7 @@ local.set $2 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.set $4 loop $while-continue|0 local.get $2 @@ -1458,7 +1458,7 @@ local.get $5 local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 local.get $4 i32.add @@ -1485,7 +1485,7 @@ i32.load local.tee $2 i32.const 8 - i32.shr_s + i32.shr_u local.set $3 local.get $2 i32.const 255 @@ -2019,7 +2019,7 @@ local.get $7 i32.add i32.const 3 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.tee $6 @@ -2037,7 +2037,7 @@ br_if $~lib/util/casemap/bsearch|inlined.0 local.get $5 i32.const 31 - i32.shr_u + i32.shr_s if local.get $6 i32.const 4 @@ -2099,7 +2099,7 @@ i32.and local.tee $2 i32.const 65536 - i32.lt_s + i32.lt_u if local.get $10 local.get $11 @@ -2126,7 +2126,7 @@ i32.shl local.get $2 i32.const 10 - i32.shr_u + i32.shr_s i32.const 55296 i32.or i32.or @@ -2334,7 +2334,7 @@ local.get $0 local.get $1 i32.const 8 - i32.shr_u + i32.shr_s i32.add i32.load8_u i32.const 5 @@ -2350,7 +2350,7 @@ local.get $1 i32.const 7 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and ) @@ -2396,7 +2396,7 @@ local.set $1 local.get $3 i32.const 7 - i32.shr_u + i32.shr_s if block $for-continue|0 local.get $4 @@ -2757,7 +2757,7 @@ i32.and local.tee $3 i32.const 65536 - i32.lt_s + i32.lt_u if local.get $10 local.get $11 @@ -2777,7 +2777,7 @@ i32.sub local.tee $3 i32.const 10 - i32.shr_u + i32.shr_s i32.const 55296 i32.or local.get $3 @@ -2865,7 +2865,7 @@ i32.sub local.tee $0 i32.const 10 - i32.shr_u + i32.shr_s i32.const 55296 i32.or local.get $0 diff --git a/tests/compiler/std/string-casemapping.untouched.wat b/tests/compiler/std/string-casemapping.untouched.wat index 00768c8b28..ac8b41a037 100644 --- a/tests/compiler/std/string-casemapping.untouched.wat +++ b/tests/compiler/std/string-casemapping.untouched.wat @@ -216,7 +216,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/rt/pure/increment (param $0 i32) (local $1 i32) @@ -346,7 +346,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -358,7 +358,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -732,7 +732,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -744,7 +744,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1057,7 +1057,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1221,7 +1221,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1251,7 +1251,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1441,7 +1441,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1717,7 +1717,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/casemap/casemap (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1737,7 +1737,7 @@ local.set $2 local.get $0 i32.const 8 - i32.shr_u + i32.shr_s local.set $3 local.get $0 i32.const 255 @@ -1772,7 +1772,7 @@ i32.load i32.mul i32.const 11 - i32.shr_u + i32.shr_s i32.const 6 i32.rem_u local.set $6 @@ -1794,7 +1794,7 @@ local.set $8 local.get $7 i32.const 8 - i32.shr_s + i32.shr_u local.set $9 local.get $8 i32.const 2 @@ -1817,7 +1817,7 @@ local.set $10 local.get $9 i32.const 8 - i32.shr_u + i32.shr_s local.set $11 loop $while-continue|0 local.get $10 @@ -1826,7 +1826,7 @@ if local.get $10 i32.const 1 - i32.shr_u + i32.shr_s local.set $13 i32.const 5304 local.get $11 @@ -1861,7 +1861,7 @@ local.set $8 local.get $7 i32.const 8 - i32.shr_s + i32.shr_u local.set $9 local.get $8 i32.const 2 @@ -2221,7 +2221,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2237,7 +2237,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2253,7 +2253,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2269,7 +2269,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2342,7 +2342,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2358,7 +2358,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2374,7 +2374,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2390,7 +2390,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2449,7 +2449,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2465,7 +2465,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2481,7 +2481,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2497,7 +2497,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -3423,7 +3423,7 @@ local.set $9 local.get $9 i32.const 7 - i32.shr_u + i32.shr_s i32.eqz if local.get $2 @@ -3567,7 +3567,7 @@ local.get $10 i32.add i32.const 3 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.set $15 @@ -3589,7 +3589,7 @@ else local.get $16 i32.const 31 - i32.shr_u + i32.shr_s if local.get $15 i32.const 4 @@ -3674,7 +3674,7 @@ local.set $12 local.get $12 i32.const 10 - i32.shr_u + i32.shr_s i32.const 55296 i32.or local.set $13 @@ -3939,7 +3939,7 @@ local.get $0 local.get $1 i32.const 8 - i32.shr_u + i32.shr_s i32.add i32.load8_u i32.const 5 @@ -3949,13 +3949,13 @@ i32.const 255 i32.and i32.const 3 - i32.shr_u + i32.shr_s i32.add i32.load8_u local.get $1 i32.const 7 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and ) @@ -4019,7 +4019,7 @@ local.set $7 local.get $7 i32.const 7 - i32.shr_u + i32.shr_s i32.eqz if local.get $2 @@ -4466,7 +4466,7 @@ local.set $7 local.get $7 i32.const 10 - i32.shr_u + i32.shr_s i32.const 55296 i32.or local.set $14 @@ -4563,7 +4563,7 @@ local.set $3 local.get $0 i32.const 10 - i32.shr_u + i32.shr_s i32.const 55296 i32.or local.set $4 @@ -5052,7 +5052,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -5197,7 +5197,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -5351,7 +5351,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $4 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 47d0c5f5b2..71b9ee3749 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -153,7 +153,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -164,7 +164,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -454,7 +454,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -465,7 +465,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -781,7 +781,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -808,7 +808,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -1040,7 +1040,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1131,7 +1131,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -2658,7 +2658,7 @@ i32.sub local.tee $3 i32.const 10 - i32.shr_u + i32.shr_s i32.const 55296 i32.or local.get $3 diff --git a/tests/compiler/std/string-encoding.untouched.wat b/tests/compiler/std/string-encoding.untouched.wat index 1fe5cf554d..b8e73dd0d2 100644 --- a/tests/compiler/std/string-encoding.untouched.wat +++ b/tests/compiler/std/string-encoding.untouched.wat @@ -211,7 +211,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -223,7 +223,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -597,7 +597,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -609,7 +609,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -922,7 +922,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1086,7 +1086,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1116,7 +1116,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1306,7 +1306,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -1582,7 +1582,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1848,7 +1848,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1864,7 +1864,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1880,7 +1880,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1896,7 +1896,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1969,7 +1969,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1985,7 +1985,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2001,7 +2001,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2017,7 +2017,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2076,7 +2076,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2092,7 +2092,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2108,7 +2108,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2124,7 +2124,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -3651,7 +3651,7 @@ if local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 192 i32.or local.set $8 @@ -3711,13 +3711,13 @@ local.set $7 local.get $7 i32.const 18 - i32.shr_u + i32.shr_s i32.const 240 i32.or local.set $8 local.get $7 i32.const 12 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -3725,7 +3725,7 @@ local.set $10 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -3765,13 +3765,13 @@ end local.get $7 i32.const 12 - i32.shr_u + i32.shr_s i32.const 224 i32.or local.set $9 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -4545,7 +4545,7 @@ local.set $8 local.get $8 i32.const 10 - i32.shr_u + i32.shr_s i32.const 55296 i32.or local.set $11 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 9d5f4b26f1..602bc6fc80 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -534,7 +534,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -740,7 +740,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -751,7 +751,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -1041,7 +1041,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -1052,7 +1052,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -1368,7 +1368,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -1395,7 +1395,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -1627,7 +1627,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1785,7 +1785,7 @@ i32.sub local.tee $0 i32.const 10 - i32.shr_u + i32.shr_s i32.const 55296 i32.or local.get $0 @@ -3342,7 +3342,7 @@ local.set $2 local.get $0 i32.const 1 - i32.shr_u + i32.shr_s local.set $0 local.get $1 local.get $1 @@ -3921,7 +3921,7 @@ if (result i32) local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $2 local.get $0 local.get $2 @@ -4052,7 +4052,7 @@ local.get $14 i64.ctz local.tee $12 - i64.shr_u + i64.shr_s local.set $14 local.get $12 local.get $0 @@ -4068,7 +4068,7 @@ i64.const 32 local.get $14 i64.const 32 - i64.shr_u + i64.shr_s i64.const 1220703125 i64.mul local.get $14 @@ -4082,7 +4082,7 @@ i64.add local.tee $12 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.clz local.tee $0 @@ -4097,7 +4097,7 @@ i64.extend_i32_u i64.shl i64.const 31 - i64.shr_u + i64.shr_s i64.const 1 i64.and local.get $12 @@ -4108,7 +4108,7 @@ i64.const 4294967295 i64.and local.get $11 - i64.shr_u + i64.shr_s i64.or i64.add local.set $14 @@ -4133,15 +4133,15 @@ i64.extend_i32_u local.get $14 i64.const 32 - i64.shr_u + i64.shr_s i64.mul local.get $12 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $14 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.clz local.tee $0 @@ -4156,7 +4156,7 @@ i64.extend_i32_u i64.shl i64.const 31 - i64.shr_u + i64.shr_s i64.const 1 i64.and local.get $14 @@ -4167,7 +4167,7 @@ i64.const 4294967295 i64.and local.get $11 - i64.shr_u + i64.shr_s i64.or i64.add f64.convert_i64_u @@ -5509,7 +5509,7 @@ i32.load offset=8 local.tee $4 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 @@ -5924,7 +5924,7 @@ i32.store16 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.tee $1 br_if $do-continue|0 end @@ -6070,7 +6070,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.tee $1 i64.const 0 i64.ne @@ -6106,7 +6106,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $2 if i32.const 0 @@ -6142,7 +6142,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add i32.add @@ -6234,7 +6234,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.tee $1 @@ -6370,7 +6370,7 @@ i64.store16 local.get $1 i64.const 4 - i64.shr_u + i64.shr_s local.tee $1 i64.const 0 i64.ne @@ -6447,7 +6447,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.tee $1 @@ -6506,7 +6506,7 @@ end local.get $0 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 if @@ -6565,7 +6565,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add i32.add @@ -6634,7 +6634,7 @@ local.get $3 local.get $11 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -6881,7 +6881,7 @@ i64.mul local.tee $3 local.get $13 - i64.shr_u + i64.shr_s local.tee $1 local.get $6 i64.extend_i32_s @@ -7337,7 +7337,7 @@ f64.ne i32.add i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.tee $4 @@ -7365,12 +7365,12 @@ local.set $2 local.get $6 i64.const 32 - i64.shr_u + i64.shr_s local.tee $6 global.get $~lib/util/number/_frc_plus local.tee $5 i64.const 32 - i64.shr_u + i64.shr_s local.tee $7 i64.mul local.get $2 @@ -7383,11 +7383,11 @@ local.tee $5 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $5 local.get $6 @@ -7399,7 +7399,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.sub @@ -7420,7 +7420,7 @@ i64.shl local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s local.tee $7 i64.mul local.get $2 @@ -7433,11 +7433,11 @@ local.tee $3 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $3 local.get $6 @@ -7449,7 +7449,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add global.get $~lib/util/number/_exp_pow local.tee $4 @@ -7470,7 +7470,7 @@ global.get $~lib/util/number/_frc_minus local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s local.tee $5 i64.mul local.get $2 @@ -7483,11 +7483,11 @@ local.tee $2 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $2 local.get $6 @@ -7499,7 +7499,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.add @@ -9245,7 +9245,7 @@ call $~lib/string/parseInt i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.eqz if i32.const 0 diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 55ead31450..7febfaf019 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -571,7 +571,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -871,7 +871,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -883,7 +883,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1257,7 +1257,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -1269,7 +1269,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1582,7 +1582,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1746,7 +1746,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1776,7 +1776,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1966,7 +1966,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -2325,7 +2325,7 @@ local.set $3 local.get $0 i32.const 10 - i32.shr_u + i32.shr_s i32.const 55296 i32.or local.set $4 @@ -2851,7 +2851,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2867,7 +2867,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2883,7 +2883,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2899,7 +2899,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2972,7 +2972,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2988,7 +2988,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -3004,7 +3004,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -3020,7 +3020,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -3079,7 +3079,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -3095,7 +3095,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -3111,7 +3111,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -3127,7 +3127,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -5697,7 +5697,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -5715,7 +5715,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -5733,7 +5733,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -5751,7 +5751,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -5790,7 +5790,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 local.get $0 local.get $0 @@ -6535,7 +6535,7 @@ local.get $17 local.tee $16 i32.const 31 - i32.shr_s + i32.shr_u local.tee $15 local.get $16 i32.add @@ -6696,7 +6696,7 @@ local.set $24 local.get $19 local.get $24 - i64.shr_u + i64.shr_s local.set $19 local.get $24 local.get $14 @@ -6725,18 +6725,18 @@ local.set $21 local.get $20 i64.const 32 - i64.shr_u + i64.shr_s local.get $15 i64.extend_i32_u i64.mul local.get $21 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $22 local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $6 local.get $6 @@ -6759,14 +6759,14 @@ i64.const 4294967295 i64.and local.get $23 - i64.shr_u + i64.shr_s i64.or local.get $21 local.get $12 i64.extend_i32_u i64.shl i64.const 31 - i64.shr_u + i64.shr_s i64.const 1 i64.and i64.add @@ -6793,18 +6793,18 @@ local.set $23 local.get $20 i64.const 32 - i64.shr_u + i64.shr_s local.get $16 i64.extend_i32_u i64.mul local.get $23 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $22 local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $13 local.get $13 @@ -6827,14 +6827,14 @@ i64.const 4294967295 i64.and local.get $21 - i64.shr_u + i64.shr_s i64.or local.get $23 local.get $12 i64.extend_i32_u i64.shl i64.const 31 - i64.shr_u + i64.shr_s i64.const 1 i64.and i64.add @@ -8515,13 +8515,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 11392 @@ -9186,7 +9186,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -9331,7 +9331,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -9411,7 +9411,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $2 if @@ -9461,7 +9461,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -9590,7 +9590,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $3 @@ -9927,7 +9927,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $4 @@ -10009,7 +10009,7 @@ end local.get $0 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 local.get $2 @@ -10096,7 +10096,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -10193,7 +10193,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $11 local.get $3 @@ -10514,7 +10514,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s local.set $22 local.get $22 local.get $14 @@ -11030,7 +11030,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $7 local.get $6 @@ -11129,7 +11129,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $14 @@ -11184,11 +11184,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -11199,7 +11199,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -11216,11 +11216,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $24 i64.const 32 - i64.shr_u + i64.shr_s local.set $24 local.get $20 local.get $21 @@ -11254,11 +11254,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $23 local.get $22 @@ -11269,7 +11269,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $18 local.get $23 @@ -11286,11 +11286,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_u + i64.shr_s local.set $18 local.get $25 i64.const 32 - i64.shr_u + i64.shr_s local.set $25 local.get $21 local.get $20 @@ -11326,11 +11326,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -11341,7 +11341,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -11358,11 +11358,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $27 i64.const 32 - i64.shr_u + i64.shr_s local.set $27 local.get $20 local.get $21 @@ -13146,7 +13146,7 @@ local.get $32 i64.reinterpret_f64 i64.const 63 - i64.shr_u + i64.shr_s i64.const 0 i64.ne i32.const 0 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 35c2d5f686..331fba1f1b 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -110,7 +110,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $3 local.get $5 local.get $3 @@ -333,7 +333,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/hash/hashStr (param $0 i32) (result i32) (local $1 i32) @@ -725,7 +725,7 @@ i32.mul local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -733,7 +733,7 @@ i32.mul local.get $0 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -741,7 +741,7 @@ i32.mul local.get $0 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index a5bff270c4..5cd3ccc218 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -114,7 +114,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -525,7 +525,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/hash/hashStr (param $0 i32) (result i32) (local $1 i32) @@ -1210,7 +1210,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -1220,7 +1220,7 @@ local.get $1 local.get $0 i32.const 16 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.xor @@ -1230,7 +1230,7 @@ local.get $1 local.get $0 i32.const 24 - i32.shr_u + i32.shr_s i32.xor i32.const 16777619 i32.mul @@ -2033,7 +2033,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2049,7 +2049,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2065,7 +2065,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -2081,7 +2081,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -2154,7 +2154,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2170,7 +2170,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2186,7 +2186,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -2202,7 +2202,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -2261,7 +2261,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2277,7 +2277,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2293,7 +2293,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -2309,7 +2309,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 577660b0fb..56af175251 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -314,7 +314,7 @@ (data (i32.const 12464) "\n\00\00\00\01\00\00\00\00\00\00\00\n\00\00\00\00\ff\00\00\00d\n\ff\ff") (data (i32.const 12496) "\n\00\00\00\01\00\00\00\00\00\00\00\n\00\00\00\01\ffd\ff\00\00d\n\ff") (table $0 123 funcref) - (elem (i32.const 1) $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 1) $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) @@ -385,7 +385,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -396,7 +396,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -686,7 +686,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -697,7 +697,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -1013,7 +1013,7 @@ if local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $1 else i32.const 31 @@ -1040,7 +1040,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $1 @@ -1272,7 +1272,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.get $5 @@ -1605,7 +1605,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 1040 @@ -1906,7 +1906,7 @@ local.get $4 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -1946,7 +1946,7 @@ local.get $5 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -1986,7 +1986,7 @@ local.get $6 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -2026,7 +2026,7 @@ local.get $7 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -2066,7 +2066,7 @@ local.get $8 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -2106,7 +2106,7 @@ local.get $9 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -2146,7 +2146,7 @@ local.get $10 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -2186,7 +2186,7 @@ local.get $11 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -2224,7 +2224,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -2248,7 +2248,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -2274,7 +2274,7 @@ local.tee $4 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $3 local.get $1 i32.const 0 @@ -2358,7 +2358,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -2385,7 +2385,7 @@ local.tee $4 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $3 local.get $1 i32.const 0 @@ -2618,7 +2618,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.tee $2 @@ -2646,24 +2646,24 @@ local.get $5 local.get $2 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $2 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq if local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.set $2 br $while-continue|1 end @@ -2671,7 +2671,7 @@ local.get $0 local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 3 i32.shl @@ -2698,7 +2698,7 @@ local.get $5 local.get $3 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -2764,7 +2764,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -2772,7 +2772,7 @@ local.get $1 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and local.get $1 @@ -2816,7 +2816,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -2843,7 +2843,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 br $while-continue|4 end @@ -2892,7 +2892,7 @@ local.get $2 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $0 i32.const 1 i32.le_s @@ -2963,7 +2963,7 @@ local.tee $2 local.get $2 i64.const 63 - i64.shr_s + i64.shr_u i64.const 1 i64.shr_u i64.xor @@ -2973,7 +2973,7 @@ local.tee $3 local.get $3 i64.const 63 - i64.shr_s + i64.shr_u i64.const 1 i64.shr_u i64.xor @@ -2989,7 +2989,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -3029,11 +3029,11 @@ local.get $2 i32.sub i32.const 31 - i32.shr_s + i32.shr_u i32.or local.get $2 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor i32.and @@ -3546,7 +3546,7 @@ local.get $5 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $1 local.get $2 i32.const 0 @@ -3653,13 +3653,13 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ne br_if $folding-inner0 local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $3 loop $for-loop|0 local.get $2 @@ -3702,7 +3702,7 @@ local.tee $4 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $3 local.get $1 i32.const 0 @@ -3787,7 +3787,7 @@ local.tee $5 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $4 local.get $3 local.get $4 @@ -3972,7 +3972,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -3996,7 +3996,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -4037,7 +4037,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -4081,7 +4081,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -4105,7 +4105,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -4151,7 +4151,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -4195,7 +4195,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -4219,7 +4219,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -4327,7 +4327,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -4389,7 +4389,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -4701,7 +4701,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $0 local.get $1 i32.load offset=4 @@ -4773,7 +4773,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -4810,7 +4810,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $0 local.get $1 i32.load offset=4 @@ -4882,7 +4882,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -4919,7 +4919,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $0 local.get $1 i32.load offset=4 @@ -5005,7 +5005,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $0 local.get $1 i32.load offset=4 @@ -5077,7 +5077,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -5119,7 +5119,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $0 local.get $1 i32.load offset=4 @@ -5191,7 +5191,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -5228,7 +5228,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $0 local.get $1 i32.load offset=4 @@ -5300,7 +5300,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -5342,7 +5342,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $0 local.get $1 i32.load offset=4 @@ -5414,7 +5414,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 1376 @@ -5456,7 +5456,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $0 local.get $1 i32.load offset=4 @@ -5528,9 +5528,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 2 - i32.gt_s + i32.gt_u ) (func $~lib/rt/tlsf/reallocateBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -6211,9 +6211,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 2 - i32.gt_s + i32.gt_u ) (func $~lib/typedarray/Int16Array#filter (param $0 i32) (result i32) (local $1 i32) @@ -6233,7 +6233,7 @@ local.get $3 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $0 i32.const 12 i32.const 6 @@ -6356,7 +6356,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -6438,7 +6438,7 @@ local.get $3 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $0 i32.const 12 i32.const 7 @@ -6561,7 +6561,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -6641,7 +6641,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $0 i32.const 12 i32.const 8 @@ -6764,7 +6764,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -6844,7 +6844,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $0 i32.const 12 i32.const 9 @@ -6967,7 +6967,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -7047,7 +7047,7 @@ local.get $3 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $0 i32.const 12 i32.const 10 @@ -7170,7 +7170,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -7250,7 +7250,7 @@ local.get $3 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $0 i32.const 12 i32.const 11 @@ -7373,7 +7373,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -7453,7 +7453,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $0 i32.const 12 i32.const 12 @@ -7576,7 +7576,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -7656,7 +7656,7 @@ local.get $3 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $0 i32.const 12 i32.const 13 @@ -7779,7 +7779,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -7838,8 +7838,10 @@ ) (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 - i32.and + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u i32.const 2 i32.eq ) @@ -7906,10 +7908,19 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u + i32.eqz + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and - i32.eqz + i32.const 2 + i32.eq ) (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7973,10 +7984,18 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 + i32.const 255 i32.and + i32.eqz + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 2 i32.eq ) @@ -8002,7 +8021,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -8047,10 +8066,19 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.eqz + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and - i32.eqz + i32.const 2 + i32.eq ) (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8074,7 +8102,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -8118,6 +8146,12 @@ local.get $3 call $~lib/rt/pure/__release ) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 65535 + i32.and + i32.eqz + ) (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 @@ -8145,7 +8179,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -8220,7 +8254,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -8295,7 +8329,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -8371,7 +8405,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -8485,8 +8519,10 @@ ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 - i32.and + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u i32.const 4 i32.eq ) @@ -8553,6 +8589,13 @@ call $~lib/rt/pure/__release local.get $2 ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 255 + i32.and + i32.const 4 + i32.eq + ) (func $~lib/typedarray/Int16Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -8574,7 +8617,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 loop $for-loop|0 @@ -8622,8 +8665,10 @@ ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 4 i32.eq ) @@ -8648,7 +8693,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 loop $for-loop|0 @@ -8694,6 +8739,13 @@ call $~lib/rt/pure/__release local.get $2 ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 65535 + i32.and + i32.const 4 + i32.eq + ) (func $~lib/typedarray/Int32Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -8715,7 +8767,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 loop $for-loop|0 @@ -8787,7 +8839,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 loop $for-loop|0 @@ -8859,7 +8911,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 loop $for-loop|0 @@ -8931,7 +8983,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 loop $for-loop|0 @@ -8983,19 +9035,14 @@ f64.eq ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/rt/pure/__retain local.get $0 i32.const 24 i32.shl i32.const 24 - i32.shr_s - i32.const 2 - i32.rem_s + i32.shr_u + i32.const 1 + i32.and i32.eqz - local.set $0 - call $~lib/rt/pure/__release - local.get $0 ) (func $~lib/typedarray/Int8Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -9130,19 +9177,14 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/rt/pure/__retain local.get $0 i32.const 16 i32.shl i32.const 16 - i32.shr_s - i32.const 2 - i32.rem_s + i32.shr_u + i32.const 1 + i32.and i32.eqz - local.set $0 - call $~lib/rt/pure/__release - local.get $0 ) (func $~lib/typedarray/Int16Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -9166,7 +9208,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -9233,7 +9275,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -9311,7 +9353,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -9389,7 +9431,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -9453,7 +9495,7 @@ local.set $4 local.get $1 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.tee $2 @@ -9486,8 +9528,6 @@ local.get $2 if (result i32) local.get $1 - i32.const 8388607 - i32.and i32.const 8388608 i32.or else @@ -9510,15 +9550,15 @@ i32.gt_s if local.get $1 - i32.const 8388608 + i32.const 1082130432 i32.ge_u if (result i32) local.get $1 - i32.const 8388608 + i32.const 1082130432 i32.eq br_if $folding-inner0 local.get $1 - i32.const 8388608 + i32.const 1082130432 i32.sub else local.get $1 @@ -9534,15 +9574,15 @@ end end local.get $1 - i32.const 8388608 + i32.const 1082130432 i32.ge_u if local.get $1 - i32.const 8388608 + i32.const 1082130432 i32.eq br_if $folding-inner0 local.get $1 - i32.const 8388608 + i32.const 1082130432 i32.sub local.set $1 end @@ -9573,7 +9613,7 @@ i32.const 1 local.get $2 i32.sub - i32.shr_u + i32.shr_s end local.get $4 i32.or @@ -9617,7 +9657,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -9671,11 +9711,11 @@ i64.reinterpret_f64 local.tee $1 i64.const 63 - i64.shr_u + i64.shr_s local.set $4 local.get $1 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.tee $2 @@ -9723,8 +9763,6 @@ i64.shl else local.get $1 - i64.const 4503599627370495 - i64.and i64.const 4503599627370496 i64.or end @@ -9735,15 +9773,15 @@ i64.gt_s if local.get $1 - i64.const 4503599627370496 + i64.const 4616189618054758400 i64.ge_u if (result i64) local.get $1 - i64.const 4503599627370496 + i64.const 4616189618054758400 i64.eq br_if $folding-inner0 local.get $1 - i64.const 4503599627370496 + i64.const 4616189618054758400 i64.sub else local.get $1 @@ -9759,15 +9797,15 @@ end end local.get $1 - i64.const 4503599627370496 + i64.const 4616189618054758400 i64.ge_u if local.get $1 - i64.const 4503599627370496 + i64.const 4616189618054758400 i64.eq br_if $folding-inner0 local.get $1 - i64.const 4503599627370496 + i64.const 4616189618054758400 i64.sub local.set $1 end @@ -9800,7 +9838,7 @@ i64.sub i64.const 1 i64.add - i64.shr_u + i64.shr_s end local.get $4 i64.const 63 @@ -9846,7 +9884,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -9892,6 +9930,60 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u + i32.const 6256 + local.get $1 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + local.get $2 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/rt/pure/__retain local.set $2 @@ -9993,6 +10085,60 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.const 6256 + local.get $1 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + local.get $2 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/rt/pure/__retain local.set $2 @@ -10109,7 +10255,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -10211,7 +10357,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $5 loop $for-loop|0 local.get $2 @@ -10421,7 +10567,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $3 local.get $0 @@ -10431,7 +10577,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 @@ -10463,7 +10609,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -11061,7 +11207,7 @@ local.get $3 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -11112,7 +11258,7 @@ local.tee $3 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.tee $0 i32.const 4 local.get $0 @@ -11206,7 +11352,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $3 local.get $0 @@ -11216,7 +11362,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 @@ -11248,7 +11394,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -11351,7 +11497,7 @@ local.get $3 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -11402,7 +11548,7 @@ local.tee $3 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.tee $0 i32.const 4 local.get $0 @@ -11635,7 +11781,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -11838,7 +11984,7 @@ local.tee $3 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $0 i32.const 4 local.get $0 @@ -12065,7 +12211,7 @@ local.get $3 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -12116,7 +12262,7 @@ local.tee $3 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $0 i32.const 4 local.get $0 @@ -12341,7 +12487,7 @@ local.tee $3 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $0 i32.const 4 local.get $0 @@ -12571,7 +12717,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -12622,7 +12768,7 @@ local.tee $3 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $0 i32.const 4 local.get $0 @@ -12852,7 +12998,7 @@ local.get $3 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -13096,10 +13242,12 @@ local.get $2 local.get $4 i32.add - i32.load8_u + i32.load8_s local.get $1 - i32.const 255 - i32.and + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u i32.eq if local.get $0 @@ -13163,10 +13311,12 @@ local.get $2 local.get $3 i32.add - i32.load8_u + i32.load8_s local.get $1 - i32.const 255 - i32.and + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u i32.eq if local.get $0 @@ -13235,7 +13385,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 1 @@ -13633,6 +13783,165 @@ local.get $1 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Uint8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 + local.get $2 + local.get $0 + call $~lib/rt/pure/__retain + local.tee $0 + i32.load offset=8 + local.tee $3 + i32.ge_s + i32.const 1 + local.get $3 + select + if + local.get $0 + call $~lib/rt/pure/__release + i32.const -1 + local.set $2 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $4 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $2 + local.get $4 + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + if + local.get $0 + call $~lib/rt/pure/__release + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + call $~lib/rt/pure/__release + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Uint8Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 + local.get $0 + call $~lib/rt/pure/__retain + local.tee $0 + i32.load offset=8 + local.tee $3 + i32.eqz + if + local.get $0 + call $~lib/rt/pure/__release + i32.const -1 + local.set $2 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $3 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $2 + local.get $3 + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + if + local.get $0 + call $~lib/rt/pure/__release + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + local.get $0 + call $~lib/rt/pure/__release + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Uint8Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/Uint8Array#lastIndexOf + ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (local $0 i32) (local $1 i32) @@ -13670,7 +13979,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf if i32.const 0 i32.const 1312 @@ -13682,7 +13991,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -13696,7 +14005,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -13710,7 +14019,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 3 i32.ne if @@ -13724,7 +14033,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 3 i32.ne if @@ -13738,7 +14047,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 3 i32.ne if @@ -13752,7 +14061,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -13766,7 +14075,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -13780,7 +14089,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 1 i32.ne if @@ -13795,7 +14104,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs + call $~lib/typedarray/Uint8Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -13808,7 +14117,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs + call $~lib/typedarray/Uint8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -13823,7 +14132,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs + call $~lib/typedarray/Uint8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -13838,7 +14147,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs + call $~lib/typedarray/Uint8Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -13852,7 +14161,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const 3 i32.ne if @@ -13866,7 +14175,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const 3 i32.ne if @@ -13880,7 +14189,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const -1 i32.ne if @@ -13894,7 +14203,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const 1 i32.ne if @@ -13908,7 +14217,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const 1 i32.ne if @@ -13922,7 +14231,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const -1 i32.ne if @@ -13939,7 +14248,7 @@ local.tee $1 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -13953,7 +14262,7 @@ local.get $1 i32.const 4 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf if i32.const 0 i32.const 1312 @@ -13965,7 +14274,7 @@ local.get $1 i32.const 5 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 1 i32.ne if @@ -13979,7 +14288,7 @@ local.get $1 i32.const 9 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -13993,7 +14302,7 @@ local.get $1 i32.const 10 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14007,7 +14316,7 @@ local.get $1 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14021,7 +14330,7 @@ local.get $1 i32.const 5 i32.const 1 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 1 i32.ne if @@ -14035,7 +14344,7 @@ local.get $1 i32.const 5 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14092,7 +14401,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf if i32.const 0 i32.const 1312 @@ -14104,7 +14413,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14118,7 +14427,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14132,7 +14441,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 3 i32.ne if @@ -14146,7 +14455,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 3 i32.ne if @@ -14160,7 +14469,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 3 i32.ne if @@ -14174,7 +14483,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14188,7 +14497,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14202,7 +14511,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 1 i32.ne if @@ -14217,7 +14526,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs + call $~lib/typedarray/Uint8Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -14230,7 +14539,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs + call $~lib/typedarray/Uint8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -14245,7 +14554,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs + call $~lib/typedarray/Uint8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -14260,7 +14569,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs + call $~lib/typedarray/Uint8Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -14274,7 +14583,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const 3 i32.ne if @@ -14288,7 +14597,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const 3 i32.ne if @@ -14302,7 +14611,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const -1 i32.ne if @@ -14316,7 +14625,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const 1 i32.ne if @@ -14330,7 +14639,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const 1 i32.ne if @@ -14344,7 +14653,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Uint8Array#lastIndexOf i32.const -1 i32.ne if @@ -14361,7 +14670,7 @@ local.tee $1 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14375,7 +14684,7 @@ local.get $1 i32.const 4 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf if i32.const 0 i32.const 1312 @@ -14387,7 +14696,7 @@ local.get $1 i32.const 5 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 1 i32.ne if @@ -14401,7 +14710,7 @@ local.get $1 i32.const 9 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14415,7 +14724,7 @@ local.get $1 i32.const 10 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14429,7 +14738,7 @@ local.get $1 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14443,7 +14752,7 @@ local.get $1 i32.const 5 i32.const 1 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const 1 i32.ne if @@ -14457,7 +14766,7 @@ local.get $1 i32.const 5 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint8Array#indexOf i32.const -1 i32.ne if @@ -14487,7 +14796,7 @@ local.tee $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 i32.ge_s i32.const 1 @@ -14528,10 +14837,12 @@ i32.const 1 i32.shl i32.add - i32.load16_u + i32.load16_s local.get $1 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.eq if local.get $0 @@ -14560,7 +14871,7 @@ local.tee $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 i32.eqz if @@ -14599,10 +14910,12 @@ i32.const 1 i32.shl i32.add - i32.load16_u + i32.load16_s local.get $1 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.eq if local.get $0 @@ -14638,7 +14951,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $2 end local.get $0 @@ -14673,7 +14986,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 1 @@ -15070,6 +15383,175 @@ local.get $1 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Uint16Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 + local.get $2 + local.get $0 + call $~lib/rt/pure/__retain + local.tee $0 + i32.load offset=8 + i32.const 1 + i32.shr_s + local.tee $3 + i32.ge_s + i32.const 1 + local.get $3 + select + if + local.get $0 + call $~lib/rt/pure/__release + i32.const -1 + local.set $2 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $4 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $4 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + if + local.get $0 + call $~lib/rt/pure/__release + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + call $~lib/rt/pure/__release + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Uint16Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 + local.get $0 + call $~lib/rt/pure/__retain + local.tee $0 + i32.load offset=8 + i32.const 1 + i32.shr_s + local.tee $3 + i32.eqz + if + local.get $0 + call $~lib/rt/pure/__release + i32.const -1 + local.set $2 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $3 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + if + local.get $0 + call $~lib/rt/pure/__release + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + local.get $0 + call $~lib/rt/pure/__release + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Uint16Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_s + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/Uint16Array#lastIndexOf + ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (local $0 i32) (local $1 i32) @@ -15107,7 +15589,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf if i32.const 0 i32.const 1312 @@ -15119,7 +15601,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const -1 i32.ne if @@ -15133,7 +15615,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const -1 i32.ne if @@ -15147,7 +15629,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const 3 i32.ne if @@ -15161,7 +15643,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const 3 i32.ne if @@ -15175,7 +15657,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const 3 i32.ne if @@ -15189,7 +15671,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const -1 i32.ne if @@ -15203,7 +15685,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const -1 i32.ne if @@ -15217,7 +15699,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const 1 i32.ne if @@ -15232,7 +15714,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Uint16Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -15245,7 +15727,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Uint16Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -15260,7 +15742,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Uint16Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -15275,7 +15757,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Uint16Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -15289,7 +15771,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Uint16Array#lastIndexOf i32.const 3 i32.ne if @@ -15303,7 +15785,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Uint16Array#lastIndexOf i32.const 3 i32.ne if @@ -15317,7 +15799,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Uint16Array#lastIndexOf i32.const -1 i32.ne if @@ -15331,7 +15813,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Uint16Array#lastIndexOf i32.const 1 i32.ne if @@ -15345,7 +15827,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Uint16Array#lastIndexOf i32.const 1 i32.ne if @@ -15359,7 +15841,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Uint16Array#lastIndexOf i32.const -1 i32.ne if @@ -15376,7 +15858,7 @@ local.tee $1 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const -1 i32.ne if @@ -15390,7 +15872,7 @@ local.get $1 i32.const 4 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf if i32.const 0 i32.const 1312 @@ -15402,7 +15884,7 @@ local.get $1 i32.const 5 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const 1 i32.ne if @@ -15416,7 +15898,7 @@ local.get $1 i32.const 9 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const -1 i32.ne if @@ -15430,7 +15912,7 @@ local.get $1 i32.const 10 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const -1 i32.ne if @@ -15444,7 +15926,7 @@ local.get $1 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const -1 i32.ne if @@ -15458,7 +15940,7 @@ local.get $1 i32.const 5 i32.const 1 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const 1 i32.ne if @@ -15472,7 +15954,7 @@ local.get $1 i32.const 5 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Uint16Array#indexOf i32.const -1 i32.ne if @@ -15502,7 +15984,7 @@ local.tee $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $3 i32.ge_s i32.const 1 @@ -15573,7 +16055,7 @@ local.tee $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $3 i32.eqz if @@ -15649,7 +16131,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $2 end local.get $0 @@ -16508,7 +16990,7 @@ local.tee $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $3 i32.ge_s i32.const 1 @@ -16579,7 +17061,7 @@ local.tee $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $3 i32.eqz if @@ -16655,7 +17137,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $2 end local.get $0 @@ -17515,7 +17997,7 @@ local.tee $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $3 i32.ge_s i32.const 1 @@ -17586,7 +18068,7 @@ local.tee $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $3 i32.eqz if @@ -17662,7 +18144,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $2 end local.get $0 @@ -18101,7 +18583,7 @@ local.tee $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $3 i32.ge_s i32.const 1 @@ -18172,7 +18654,7 @@ local.tee $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $3 i32.eqz if @@ -18248,7 +18730,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $2 end local.get $0 @@ -18759,7 +19241,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $1 if i32.const 0 @@ -18795,7 +19277,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/number/itoa_buffered (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -18803,9 +19285,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 0 - i32.lt_s + i32.lt_u local.tee $2 if local.get $0 @@ -18820,7 +19302,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 10 i32.lt_u if @@ -18833,7 +19315,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 48 i32.or i32.store16 @@ -18847,7 +19329,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.tee $2 call $~lib/util/number/decimalCount32 i32.add @@ -19387,9 +19869,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 0 - i32.lt_s + i32.lt_u local.tee $2 if local.get $0 @@ -19404,7 +19886,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 10 i32.lt_u if @@ -19417,7 +19899,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 48 i32.or i32.store16 @@ -19431,7 +19913,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 call $~lib/util/number/decimalCount32 i32.add @@ -19571,7 +20053,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -19735,7 +20217,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -19912,7 +20394,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -20067,7 +20549,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -20247,7 +20729,7 @@ drop local.get $3 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $0 if @@ -20400,7 +20882,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -20611,7 +21093,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -20645,7 +21127,7 @@ local.get $3 local.get $11 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -20892,7 +21374,7 @@ i64.mul local.tee $3 local.get $13 - i64.shr_u + i64.shr_s local.tee $1 local.get $6 i64.extend_i32_s @@ -21348,7 +21830,7 @@ f64.ne i32.add i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.tee $4 @@ -21376,12 +21858,12 @@ local.set $2 local.get $6 i64.const 32 - i64.shr_u + i64.shr_s local.tee $6 global.get $~lib/util/number/_frc_plus local.tee $5 i64.const 32 - i64.shr_u + i64.shr_s local.tee $7 i64.mul local.get $2 @@ -21394,11 +21876,11 @@ local.tee $5 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $5 local.get $6 @@ -21410,7 +21892,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.sub @@ -21431,7 +21913,7 @@ i64.shl local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s local.tee $7 i64.mul local.get $2 @@ -21444,11 +21926,11 @@ local.tee $3 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $3 local.get $6 @@ -21460,7 +21942,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add global.get $~lib/util/number/_exp_pow local.tee $4 @@ -21481,7 +21963,7 @@ global.get $~lib/util/number/_frc_minus local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s local.tee $5 i64.mul local.get $2 @@ -21494,11 +21976,11 @@ local.tee $2 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $2 local.get $6 @@ -21510,7 +21992,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.add @@ -21780,7 +22262,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s call $~lib/util/string/joinFloatArray i32.const 7168 call $~lib/rt/pure/__release @@ -21914,7 +22396,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s call $~lib/util/string/joinFloatArray i32.const 7168 call $~lib/rt/pure/__release @@ -22146,7 +22628,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 @@ -22499,7 +22981,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 @@ -23805,7 +24287,7 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 6 i32.add local.get $0 @@ -23830,7 +24312,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -23993,7 +24475,7 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 4 i32.add local.get $0 @@ -24018,7 +24500,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -24663,7 +25145,7 @@ i32.load local.tee $3 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor local.get $3 @@ -24671,7 +25153,7 @@ local.get $3 i32.sub i32.const 31 - i32.shr_s + i32.shr_u i32.or i32.and i32.store8 @@ -24871,7 +25353,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.add local.get $1 i32.load offset=8 @@ -24895,7 +25377,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $7 loop $for-loop|0 local.get $3 @@ -24914,7 +25396,7 @@ local.tee $5 i32.wrap_i64 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor i64.extend_i32_s @@ -24924,7 +25406,7 @@ i32.wrap_i64 i32.sub i32.const 31 - i32.shr_s + i32.shr_u i64.extend_i32_s i64.or i64.and @@ -25055,7 +25537,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.add local.get $1 i32.load offset=8 @@ -25079,7 +25561,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $7 loop $for-loop|0 local.get $3 @@ -25097,7 +25579,7 @@ i32.load16_s local.tee $2 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor local.get $2 @@ -25105,7 +25587,7 @@ local.get $2 i32.sub i32.const 31 - i32.shr_s + i32.shr_u i32.or i32.and i32.store8 @@ -25175,7 +25657,7 @@ i32.load8_s local.tee $3 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor local.get $3 @@ -25183,7 +25665,7 @@ local.get $3 i32.sub i32.const 31 - i32.shr_s + i32.shr_u i32.or i32.and i32.store8 @@ -25395,7 +25877,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -25468,7 +25950,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 local.get $1 i32.load offset=12 @@ -25545,7 +26027,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -25625,13 +26107,13 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 6 i32.add local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -25652,7 +26134,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -25704,7 +26186,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -25786,7 +26268,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -25847,13 +26329,13 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 4 i32.add local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -25897,7 +26379,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -26113,7 +26595,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.tee $3 local.get $1 i32.load offset=12 @@ -26190,7 +26672,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -26272,7 +26754,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -26490,7 +26972,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -26528,7 +27010,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $3 local.get $1 i32.load offset=12 @@ -26606,7 +27088,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -26685,13 +27167,13 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 6 i32.add local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -26712,7 +27194,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -26764,7 +27246,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -26846,7 +27328,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -26911,13 +27393,13 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 4 i32.add local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -26938,7 +27420,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -26989,7 +27471,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -27196,7 +27678,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $3 local.get $1 i32.load offset=12 @@ -27274,7 +27756,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -27355,7 +27837,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -27577,7 +28059,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -27650,7 +28132,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $3 local.get $1 i32.load offset=12 @@ -27727,7 +28209,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -27803,13 +28285,13 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 6 i32.add local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -27855,7 +28337,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -27936,7 +28418,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -28001,13 +28483,13 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 4 i32.add local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -28028,7 +28510,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -28079,7 +28561,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -28286,7 +28768,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $3 local.get $1 i32.load offset=12 @@ -28363,7 +28845,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -28446,7 +28928,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -28674,7 +29156,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $3 local.get $1 i32.load offset=12 @@ -28749,13 +29231,13 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 6 i32.add local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -28776,7 +29258,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -28827,13 +29309,13 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 4 i32.add local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -28854,7 +29336,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -28965,7 +29447,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s br_if $folding-inner0 local.get $1 @@ -29028,7 +29510,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s br_if $folding-inner0 local.get $0 @@ -29082,7 +29564,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s br_if $folding-inner0 local.get $1 @@ -29140,7 +29622,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.gt_s br_if $folding-inner0 local.get $1 @@ -29242,7 +29724,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $3 local.get $1 i32.load offset=12 @@ -29316,13 +29798,13 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 6 i32.add local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -29343,7 +29825,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -29393,13 +29875,13 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 4 i32.add local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s if i32.const 1376 @@ -29420,7 +29902,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -29531,7 +30013,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s br_if $folding-inner1 local.get $1 @@ -29597,7 +30079,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s br_if $folding-inner1 local.get $1 @@ -29678,7 +30160,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s br_if $folding-inner1 local.get $1 @@ -29736,7 +30218,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.gt_s br_if $folding-inner1 local.get $1 @@ -29833,7 +30315,7 @@ local.tee $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $0 @@ -29858,7 +30340,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $7 loop $for-loop|0 local.get $2 @@ -29922,7 +30404,7 @@ local.tee $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 8 i32.add local.get $0 @@ -29947,7 +30429,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $7 loop $for-loop|0 local.get $2 @@ -29965,7 +30447,7 @@ i32.load local.tee $4 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor local.get $4 @@ -29973,7 +30455,7 @@ local.get $4 i32.sub i32.const 31 - i32.shr_s + i32.shr_u i32.or i32.and i32.store8 @@ -30009,7 +30491,7 @@ local.tee $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.get $0 i32.load offset=8 i32.gt_s @@ -30030,7 +30512,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $6 loop $for-loop|0 local.get $2 @@ -30119,7 +30601,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -30201,7 +30683,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.ne if @@ -30295,7 +30777,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 4 i32.ne if @@ -30831,7 +31313,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -31565,7 +32047,7 @@ local.tee $2 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 3 i32.ne if @@ -31633,7 +32115,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 2 i32.ne if @@ -31686,7 +32168,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.ne if @@ -31737,11 +32219,11 @@ local.get $4 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -31869,8 +32351,10 @@ block $folding-inner3 block $folding-inner2 local.get $3 - i32.const 255 - i32.and + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u i32.const 6 i32.ne br_if $folding-inner2 @@ -31966,7 +32450,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 loop $for-loop|00 local.get $0 @@ -32004,8 +32488,10 @@ i32.const 2800 call $~lib/rt/pure/__release local.get $3 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 6 i32.ne br_if $folding-inner2 @@ -32045,7 +32531,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 loop $for-loop|01 local.get $0 @@ -32226,7 +32712,7 @@ local.get $2 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $7 loop $for-loop|02 local.get $0 @@ -32301,7 +32787,7 @@ local.get $2 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $7 loop $for-loop|03 local.get $0 @@ -32412,8 +32898,10 @@ i32.const 3056 call $~lib/rt/pure/__release local.get $3 - i32.const 255 - i32.and + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u i32.const 6 i32.ne br_if $folding-inner3 @@ -32507,7 +32995,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -32547,8 +33035,10 @@ i32.const 3152 call $~lib/rt/pure/__release local.get $3 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_u i32.const 6 i32.ne br_if $folding-inner3 @@ -32586,7 +33076,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -32770,7 +33260,7 @@ local.get $2 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -32847,7 +33337,7 @@ local.get $2 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.sub local.set $0 @@ -34373,7 +34863,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 @@ -34383,7 +34873,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 @@ -34393,7 +34883,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set i32.const 0 local.set $1 @@ -34548,7 +35038,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 @@ -34558,7 +35048,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 @@ -34568,7 +35058,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set i32.const 0 local.set $1 @@ -34584,7 +35074,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $7 loop $for-loop|010 local.get $1 @@ -34671,7 +35161,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s local.set $7 loop $for-loop|011 local.get $1 @@ -34909,7 +35399,7 @@ local.get $2 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.set $7 loop $for-loop|012 local.get $1 @@ -34993,7 +35483,7 @@ local.get $2 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.set $7 loop $for-loop|013 local.get $1 @@ -35085,7 +35575,7 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s local.tee $3 i32.ge_s i32.const 1 @@ -35174,7 +35664,7 @@ local.tee $1 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s local.tee $4 i32.ge_s i32.const 1 diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 09e9e6da94..e1630dbc54 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -425,7 +425,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -437,7 +437,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -811,7 +811,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -823,7 +823,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1136,7 +1136,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1300,7 +1300,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1330,7 +1330,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1520,7 +1520,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 @@ -2094,7 +2094,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_u + i32.shr_s i32.gt_u if i32.const 32 @@ -2231,7 +2231,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/typedarray/Uint16Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2254,7 +2254,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/typedarray/Int32Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2277,7 +2277,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s ) (func $~lib/typedarray/Uint32Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2300,7 +2300,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s ) (func $~lib/typedarray/Int64Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2323,7 +2323,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s ) (func $~lib/typedarray/Uint64Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2346,7 +2346,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s ) (func $~lib/typedarray/Float32Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2369,7 +2369,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s ) (func $~lib/typedarray/Float64Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2392,7 +2392,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s ) (func $std/typedarray/testInstantiate (param $0 i32) (local $1 i32) @@ -2929,7 +2929,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -2953,7 +2953,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -3083,7 +3083,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -3395,7 +3395,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl local.set $3 @@ -3427,17 +3427,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_s + i32.shr_u i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.eq @@ -3446,14 +3446,14 @@ if local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 local.get $0 local.get $8 @@ -3482,14 +3482,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -3561,7 +3561,7 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -3569,7 +3569,7 @@ local.get $8 i32.const 31 i32.and - i32.shr_u + i32.shr_s i32.const 1 i32.and i32.add @@ -3614,14 +3614,14 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add local.get $4 local.get $8 i32.const 5 - i32.shr_u + i32.shr_s i32.const 2 i32.shl i32.add @@ -3646,7 +3646,7 @@ end local.get $8 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 br $while-continue|4 end @@ -3792,17 +3792,17 @@ local.get $2 local.get $2 i64.const 63 - i64.shr_s - i64.const 1 i64.shr_u + i64.const 1 + i64.shr_s i64.xor local.set $2 local.get $3 local.get $3 i64.const 63 - i64.shr_s - i64.const 1 i64.shr_u + i64.const 1 + i64.shr_s i64.xor local.set $3 local.get $2 @@ -3853,7 +3853,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -3890,14 +3890,14 @@ i32.add local.get $2 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor i32.const 255 local.get $2 i32.sub i32.const 31 - i32.shr_s + i32.shr_u local.get $2 i32.or i32.and @@ -4299,7 +4299,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -4315,7 +4315,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -4331,7 +4331,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -4347,7 +4347,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -4420,7 +4420,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -4436,7 +4436,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -4452,7 +4452,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -4468,7 +4468,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -4527,7 +4527,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -4543,7 +4543,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -4559,7 +4559,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -4575,7 +4575,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -6129,7 +6129,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 6 i32.eq i32.eqz @@ -6425,7 +6425,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -6556,7 +6556,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 6 i32.eq i32.eqz @@ -6578,7 +6578,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -6854,7 +6854,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -7003,7 +7003,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -7153,7 +7153,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -7303,7 +7303,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -7685,7 +7685,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 6 i32.eq i32.eqz @@ -8065,7 +8065,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 6 i32.eq i32.eqz @@ -9637,7 +9637,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -9843,7 +9843,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -10232,7 +10232,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -10438,7 +10438,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -10644,7 +10644,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -10850,7 +10850,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_u + i32.shr_s i32.ge_u if i32.const 368 @@ -11135,7 +11135,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 2 i32.gt_s local.set $3 @@ -11986,7 +11986,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 2 i32.gt_s local.set $3 @@ -13888,7 +13888,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 2 i32.eq local.set $3 @@ -13981,7 +13981,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 0 i32.eq local.set $3 @@ -14387,7 +14387,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 2 i32.eq local.set $3 @@ -14480,7 +14480,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 0 i32.eq local.set $3 @@ -15687,7 +15687,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 2 i32.eq local.set $3 @@ -15780,7 +15780,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 4 i32.eq local.set $3 @@ -16189,7 +16189,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 2 i32.eq local.set $3 @@ -16282,7 +16282,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 4 i32.eq local.set $3 @@ -17497,7 +17497,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 2 i32.rem_s i32.const 0 @@ -17595,7 +17595,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 2 i32.eq local.set $3 @@ -18011,7 +18011,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 2 i32.rem_s i32.const 0 @@ -18109,7 +18109,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 2 i32.eq local.set $3 @@ -19042,13 +19042,13 @@ local.set $3 local.get $2 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_u + i32.shr_s i32.const 255 i32.and local.set $5 @@ -19129,7 +19129,7 @@ local.get $2 i32.const -1 i32.const 9 - i32.shr_u + i32.shr_s i32.and local.set $2 local.get $2 @@ -19161,7 +19161,7 @@ local.get $3 i32.const -1 i32.const 9 - i32.shr_u + i32.shr_s i32.and local.set $3 local.get $3 @@ -19261,7 +19261,7 @@ i32.sub i32.const 1 i32.add - i32.shr_u + i32.shr_s local.set $2 end local.get $2 @@ -19469,19 +19469,19 @@ local.set $3 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $4 local.get $3 i64.const 52 - i64.shr_u + i64.shr_s i64.const 2047 i64.and local.set $5 local.get $2 i64.const 63 - i64.shr_u + i64.shr_s local.set $6 local.get $3 i64.const 1 @@ -19558,7 +19558,7 @@ local.get $2 i64.const -1 i64.const 12 - i64.shr_u + i64.shr_s i64.and local.set $2 local.get $2 @@ -19592,7 +19592,7 @@ local.get $3 i64.const -1 i64.const 12 - i64.shr_u + i64.shr_s i64.and local.set $3 local.get $3 @@ -19692,7 +19692,7 @@ i64.sub i64.const 1 i64.add - i64.shr_u + i64.shr_s local.set $2 end local.get $2 @@ -19883,12 +19883,12 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -20009,7 +20009,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 1 @@ -20019,7 +20019,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 2 @@ -20029,7 +20029,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 5280 @@ -20406,12 +20406,12 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -20532,7 +20532,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 1 @@ -20542,7 +20542,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 2 @@ -20552,7 +20552,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 5376 @@ -21836,7 +21836,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $5 local.get $6 @@ -21846,7 +21846,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $6 i32.const 1 @@ -21880,7 +21880,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -22892,7 +22892,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $5 local.get $6 @@ -22902,7 +22902,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $6 i32.const 1 @@ -22936,7 +22936,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eq i32.eqz if @@ -25320,7 +25320,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq if local.get $6 @@ -25416,7 +25416,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.eq if local.get $6 @@ -25497,7 +25497,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $4 i32.const 1 @@ -27393,7 +27393,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eq if local.get $6 @@ -27489,7 +27489,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.eq if local.get $6 @@ -27570,7 +27570,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $4 i32.const 1 @@ -33254,7 +33254,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_u + i64.shr_s local.set $1 br $while-continue|0 end @@ -33399,7 +33399,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_u + i64.shr_s local.set $1 local.get $1 i64.const 0 @@ -33479,7 +33479,7 @@ end local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.set $2 local.get $2 if @@ -33529,7 +33529,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -33595,7 +33595,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/number/itoa_buffered (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -33611,7 +33611,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 0 i32.lt_s local.set $2 @@ -33639,7 +33639,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 10 i32.lt_u if @@ -33652,7 +33652,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u i32.const 48 i32.or i32.store16 @@ -33672,7 +33672,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/util/number/decimalCount32 i32.add local.set $3 @@ -33682,7 +33682,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.set $4 @@ -34322,7 +34322,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $3 @@ -34790,7 +34790,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 0 i32.lt_s local.set $2 @@ -34818,7 +34818,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 10 i32.lt_u if @@ -34831,7 +34831,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u i32.const 48 i32.or i32.store16 @@ -34851,7 +34851,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/util/number/decimalCount32 i32.add local.set $3 @@ -34861,7 +34861,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.set $4 @@ -36295,7 +36295,7 @@ end local.get $0 i64.const 63 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $2 local.get $2 @@ -36382,7 +36382,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $2 @@ -36907,7 +36907,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $4 @@ -37331,7 +37331,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $11 local.get $3 @@ -37652,7 +37652,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s local.set $22 local.get $22 local.get $14 @@ -38168,7 +38168,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $7 local.get $6 @@ -38267,7 +38267,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $14 @@ -38322,11 +38322,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -38337,7 +38337,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -38354,11 +38354,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $24 i64.const 32 - i64.shr_u + i64.shr_s local.set $24 local.get $20 local.get $21 @@ -38392,11 +38392,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $23 local.get $22 @@ -38407,7 +38407,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $18 local.get $23 @@ -38424,11 +38424,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_u + i64.shr_s local.set $18 local.get $25 i64.const 32 - i64.shr_u + i64.shr_s local.set $25 local.get $21 local.get $20 @@ -38464,11 +38464,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -38479,7 +38479,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -38496,11 +38496,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $27 i64.const 32 - i64.shr_u + i64.shr_s local.set $27 local.get $20 local.get $21 @@ -39586,7 +39586,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int8Array#__set local.get $4 i32.const 1 @@ -40208,7 +40208,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_s + i32.shr_u call $~lib/typedarray/Int16Array#__set local.get $4 i32.const 1 @@ -44497,14 +44497,14 @@ i32.add local.get $11 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor i32.const 255 local.get $11 i32.sub i32.const 31 - i32.shr_s + i32.shr_u local.get $11 i32.or i32.and @@ -44871,7 +44871,7 @@ local.get $11 i32.wrap_i64 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor i64.extend_i32_s @@ -44880,7 +44880,7 @@ i32.wrap_i64 i32.sub i32.const 31 - i32.shr_s + i32.shr_u i64.extend_i32_s local.get $11 i64.or @@ -45240,14 +45240,14 @@ i32.add local.get $11 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor i32.const 255 local.get $11 i32.sub i32.const 31 - i32.shr_s + i32.shr_u local.get $11 i32.or i32.and @@ -45384,14 +45384,14 @@ i32.add local.get $11 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor i32.const 255 local.get $11 i32.sub i32.const 31 - i32.shr_s + i32.shr_u local.get $11 i32.or i32.and @@ -55001,14 +55001,14 @@ i32.add local.get $11 i32.const 31 - i32.shr_s + i32.shr_u i32.const -1 i32.xor i32.const 255 local.get $11 i32.sub i32.const 31 - i32.shr_s + i32.shr_u local.get $11 i32.or i32.and diff --git a/tests/compiler/super-inline.optimized.wat b/tests/compiler/super-inline.optimized.wat index 3a7a9f164b..51c77534b8 100644 --- a/tests/compiler/super-inline.optimized.wat +++ b/tests/compiler/super-inline.optimized.wat @@ -34,7 +34,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/super-inline.untouched.wat b/tests/compiler/super-inline.untouched.wat index 798dcad8b1..05164c44fa 100644 --- a/tests/compiler/super-inline.untouched.wat +++ b/tests/compiler/super-inline.untouched.wat @@ -38,7 +38,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/throw.untouched.wat b/tests/compiler/throw.untouched.wat index 383394d55d..26f920d200 100644 --- a/tests/compiler/throw.untouched.wat +++ b/tests/compiler/throw.untouched.wat @@ -194,7 +194,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -206,7 +206,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -580,7 +580,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -592,7 +592,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index b51c195178..74929d7bd0 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -24,7 +24,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -368,7 +368,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $0 local.get $1 local.get $0 diff --git a/tests/compiler/typeof.untouched.wat b/tests/compiler/typeof.untouched.wat index bb5d963873..5b7fc71c44 100644 --- a/tests/compiler/typeof.untouched.wat +++ b/tests/compiler/typeof.untouched.wat @@ -46,7 +46,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -276,7 +276,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/wasi/abort.optimized.wat b/tests/compiler/wasi/abort.optimized.wat index 1f8d5069ad..3fb0b39f6d 100644 --- a/tests/compiler/wasi/abort.optimized.wat +++ b/tests/compiler/wasi/abort.optimized.wat @@ -18,7 +18,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/wasi/abort.untouched.wat b/tests/compiler/wasi/abort.untouched.wat index 44144138d2..861ad3fc12 100644 --- a/tests/compiler/wasi/abort.untouched.wat +++ b/tests/compiler/wasi/abort.untouched.wat @@ -22,7 +22,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -70,7 +70,7 @@ if local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 192 i32.or local.set $8 @@ -130,13 +130,13 @@ local.set $7 local.get $7 i32.const 18 - i32.shr_u + i32.shr_s i32.const 240 i32.or local.set $8 local.get $7 i32.const 12 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -144,7 +144,7 @@ local.set $10 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -184,13 +184,13 @@ end local.get $7 i32.const 12 - i32.shr_u + i32.shr_s i32.const 224 i32.or local.set $9 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index 1d8aa7d06c..7d95bdc4ec 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -23,21 +23,21 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor i64.const -49064778989728563 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor i64.const -4265267296055464877 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor ) (func $~lib/math/splitMix32 (param $0 i32) (result i32) @@ -47,7 +47,7 @@ local.tee $0 local.get $0 i32.const 15 - i32.shr_u + i32.shr_s i32.xor local.get $0 i32.const 1 @@ -61,7 +61,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_u + i32.shr_s i32.xor i32.mul i32.add @@ -69,7 +69,7 @@ local.tee $0 local.get $0 i32.const 14 - i32.shr_u + i32.shr_s i32.xor ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (result i32) @@ -311,7 +311,7 @@ i32.const 1036 i32.load i32.const 1 - i32.shr_u + i32.shr_s call $~lib/string/String.UTF8.encodeUnsafe i32.const 23 i32.add @@ -473,17 +473,17 @@ local.tee $1 local.get $1 i64.const 17 - i64.shr_u + i64.shr_s i64.xor i64.xor local.get $0 i64.const 26 - i64.shr_u + i64.shr_s i64.xor global.set $~lib/math/random_state1_64 local.get $0 i64.const 12 - i64.shr_u + i64.shr_s i64.const 4607182418800017408 i64.or f64.reinterpret_i64 diff --git a/tests/compiler/wasi/seed.untouched.wat b/tests/compiler/wasi/seed.untouched.wat index 1dec2cce96..5d80362b45 100644 --- a/tests/compiler/wasi/seed.untouched.wat +++ b/tests/compiler/wasi/seed.untouched.wat @@ -55,7 +55,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -65,7 +65,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -75,7 +75,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -88,7 +88,7 @@ local.get $0 local.get $0 i32.const 15 - i32.shr_u + i32.shr_s i32.xor local.get $0 i32.const 1 @@ -100,7 +100,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_u + i32.shr_s i32.xor local.get $0 i32.const 61 @@ -112,7 +112,7 @@ local.get $0 local.get $0 i32.const 14 - i32.shr_u + i32.shr_s i32.xor ) (func $~lib/rt/stub/__retain (param $0 i32) (result i32) @@ -124,7 +124,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -172,7 +172,7 @@ if local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 192 i32.or local.set $8 @@ -232,13 +232,13 @@ local.set $7 local.get $7 i32.const 18 - i32.shr_u + i32.shr_s i32.const 240 i32.or local.set $8 local.get $7 i32.const 12 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -246,7 +246,7 @@ local.set $10 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -286,13 +286,13 @@ end local.get $7 i32.const 12 - i32.shr_u + i32.shr_s i32.const 224 i32.or local.set $9 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -644,7 +644,7 @@ local.get $0 local.get $0 i64.const 17 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 @@ -654,14 +654,14 @@ local.get $0 local.get $1 i64.const 26 - i64.shr_u + i64.shr_s i64.xor local.set $0 local.get $0 global.set $~lib/math/random_state1_64 local.get $1 i64.const 12 - i64.shr_u + i64.shr_s i64.const 4607182418800017408 i64.or local.set $2 diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index 264ec7194d..c8035b2aed 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -155,7 +155,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 local.get $4 local.get $2 @@ -199,7 +199,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -444,7 +444,7 @@ local.get $3 local.get $11 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -691,7 +691,7 @@ i64.mul local.tee $3 local.get $13 - i64.shr_u + i64.shr_s local.tee $1 local.get $6 i64.extend_i32_s @@ -1347,7 +1347,7 @@ f64.ne i32.add i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.tee $4 @@ -1375,12 +1375,12 @@ local.set $2 local.get $6 i64.const 32 - i64.shr_u + i64.shr_s local.tee $6 global.get $~lib/util/number/_frc_plus local.tee $5 i64.const 32 - i64.shr_u + i64.shr_s local.tee $7 i64.mul local.get $2 @@ -1393,11 +1393,11 @@ local.tee $5 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $5 local.get $6 @@ -1409,7 +1409,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.sub @@ -1430,7 +1430,7 @@ i64.shl local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s local.tee $7 i64.mul local.get $2 @@ -1443,11 +1443,11 @@ local.tee $3 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $7 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $3 local.get $6 @@ -1459,7 +1459,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add global.get $~lib/util/number/_exp_pow local.tee $4 @@ -1480,7 +1480,7 @@ global.get $~lib/util/number/_frc_minus local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s local.tee $5 i64.mul local.get $2 @@ -1493,11 +1493,11 @@ local.tee $2 i64.mul i64.const 32 - i64.shr_u + i64.shr_s i64.add local.tee $3 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.get $2 local.get $6 @@ -1509,7 +1509,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_u + i64.shr_s i64.add i64.const 1 i64.add diff --git a/tests/compiler/wasi/trace.untouched.wat b/tests/compiler/wasi/trace.untouched.wat index 78bd45543a..6a72f27da0 100644 --- a/tests/compiler/wasi/trace.untouched.wat +++ b/tests/compiler/wasi/trace.untouched.wat @@ -176,7 +176,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $1 local.tee $4 @@ -265,7 +265,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_u + i32.shr_s ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -313,7 +313,7 @@ if local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 192 i32.or local.set $8 @@ -373,13 +373,13 @@ local.set $7 local.get $7 i32.const 18 - i32.shr_u + i32.shr_s i32.const 240 i32.or local.set $8 local.get $7 i32.const 12 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -387,7 +387,7 @@ local.set $10 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -427,13 +427,13 @@ end local.get $7 i32.const 12 - i32.shr_u + i32.shr_s i32.const 224 i32.or local.set $9 local.get $7 i32.const 6 - i32.shr_u + i32.shr_s i32.const 63 i32.and i32.const 128 @@ -580,7 +580,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $11 local.get $3 @@ -901,7 +901,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_u + i64.shr_s local.set $22 local.get $22 local.get $14 @@ -1302,7 +1302,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1318,7 +1318,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1334,7 +1334,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_u + i32.shr_s local.get $4 i32.const 8 i32.shl @@ -1350,7 +1350,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 8 i32.shl @@ -1423,7 +1423,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1439,7 +1439,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -1455,7 +1455,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_u + i32.shr_s local.get $4 i32.const 16 i32.shl @@ -1471,7 +1471,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl @@ -1530,7 +1530,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -1546,7 +1546,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -1562,7 +1562,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_u + i32.shr_s local.get $4 i32.const 24 i32.shl @@ -1578,7 +1578,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl @@ -2810,7 +2810,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_u + i64.shr_s i32.wrap_i64 local.set $7 local.get $6 @@ -2909,7 +2909,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.set $14 @@ -2964,11 +2964,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -2979,7 +2979,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -2996,11 +2996,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $24 i64.const 32 - i64.shr_u + i64.shr_s local.set $24 local.get $20 local.get $21 @@ -3034,11 +3034,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $23 local.get $22 @@ -3049,7 +3049,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $18 local.get $23 @@ -3066,11 +3066,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_u + i64.shr_s local.set $18 local.get $25 i64.const 32 - i64.shr_u + i64.shr_s local.set $25 local.get $21 local.get $20 @@ -3106,11 +3106,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_u + i64.shr_s local.set $20 local.get $11 i64.const 32 - i64.shr_u + i64.shr_s local.set $21 local.get $18 local.get $19 @@ -3121,7 +3121,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_u + i64.shr_s i64.add local.set $23 local.get $18 @@ -3138,11 +3138,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_u + i64.shr_s local.set $23 local.get $27 i64.const 32 - i64.shr_u + i64.shr_s local.set $27 local.get $20 local.get $21 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 2d68ddf8bf..a7247b7505 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -155,7 +155,7 @@ if local.get $2 i32.const 4 - i32.shr_u + i32.shr_s local.set $2 else local.get $2 @@ -166,7 +166,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $2 @@ -456,7 +456,7 @@ if local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $3 @@ -467,7 +467,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 16 i32.xor local.set $3 @@ -851,7 +851,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 4886d25300..ef4bf2ac0f 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -545,7 +545,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_u + i32.shr_s local.set $5 else i32.const 31 @@ -557,7 +557,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -931,7 +931,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_u + i32.shr_s local.set $10 else i32.const 31 @@ -943,7 +943,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1256,7 +1256,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $3 local.get $3 local.get $2 @@ -1420,7 +1420,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_u + i32.shr_s local.set $3 else local.get $1 @@ -1450,7 +1450,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_u + i32.shr_s i32.const 1 i32.const 4 i32.shl @@ -1640,7 +1640,7 @@ i32.xor i32.and i32.const 16 - i32.shr_u + i32.shr_s local.set $4 local.get $2 local.tee $3 From 4b3341b8dc2ee05db805e51521e6d76b49df8751 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 29 Sep 2020 11:32:46 +0300 Subject: [PATCH 2/8] add regress tests --- .../optimize-instruction-regressions.json | 7 +++ ...mize-instruction-regressions.optimized.wat | 48 +++++++++++++++++++ .../optimize-instruction-regressions.ts | 4 ++ ...mize-instruction-regressions.untouched.wat | 48 +++++++++++++++++++ 4 files changed, 107 insertions(+) create mode 100644 tests/compiler/optimize-instruction-regressions.json create mode 100644 tests/compiler/optimize-instruction-regressions.optimized.wat create mode 100644 tests/compiler/optimize-instruction-regressions.ts create mode 100644 tests/compiler/optimize-instruction-regressions.untouched.wat diff --git a/tests/compiler/optimize-instruction-regressions.json b/tests/compiler/optimize-instruction-regressions.json new file mode 100644 index 0000000000..c2f49a5e60 --- /dev/null +++ b/tests/compiler/optimize-instruction-regressions.json @@ -0,0 +1,7 @@ +{ + "asc_flags": [ + "--runtime none", + "-O0", + "--runPasses optimize-instructions" + ] +} diff --git a/tests/compiler/optimize-instruction-regressions.optimized.wat b/tests/compiler/optimize-instruction-regressions.optimized.wat new file mode 100644 index 0000000000..29054a2133 --- /dev/null +++ b/tests/compiler/optimize-instruction-regressions.optimized.wat @@ -0,0 +1,48 @@ +(module + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 16) "F\00\00\00\01\00\00\00\01\00\00\00F\00\00\00o\00p\00t\00i\00m\00i\00z\00e\00-\00i\00n\00s\00t\00r\00u\00c\00t\00i\00o\00n\00-\00r\00e\00g\00r\00e\00s\00s\00i\00o\00n\00s\00.\00t\00s\00") + (table $0 1 funcref) + (global $optimize-instruction-regressions/x (mut i32) (i32.const 128)) + (export "memory" (memory $0)) + (start $~start) + (func $start:optimize-instruction-regressions + global.get $optimize-instruction-regressions/x + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u + i32.const -128 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 2 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 129 + global.set $optimize-instruction-regressions/x + global.get $optimize-instruction-regressions/x + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u + i32.const -127 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 4 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $~start + call $start:optimize-instruction-regressions + ) +) diff --git a/tests/compiler/optimize-instruction-regressions.ts b/tests/compiler/optimize-instruction-regressions.ts new file mode 100644 index 0000000000..8211c9c688 --- /dev/null +++ b/tests/compiler/optimize-instruction-regressions.ts @@ -0,0 +1,4 @@ +let x: i32 = 128; +assert(((x << 24) >> 24) == -128); +x = 129; +assert(((x << 24) >> 24) == -127); diff --git a/tests/compiler/optimize-instruction-regressions.untouched.wat b/tests/compiler/optimize-instruction-regressions.untouched.wat new file mode 100644 index 0000000000..29054a2133 --- /dev/null +++ b/tests/compiler/optimize-instruction-regressions.untouched.wat @@ -0,0 +1,48 @@ +(module + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 16) "F\00\00\00\01\00\00\00\01\00\00\00F\00\00\00o\00p\00t\00i\00m\00i\00z\00e\00-\00i\00n\00s\00t\00r\00u\00c\00t\00i\00o\00n\00-\00r\00e\00g\00r\00e\00s\00s\00i\00o\00n\00s\00.\00t\00s\00") + (table $0 1 funcref) + (global $optimize-instruction-regressions/x (mut i32) (i32.const 128)) + (export "memory" (memory $0)) + (start $~start) + (func $start:optimize-instruction-regressions + global.get $optimize-instruction-regressions/x + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u + i32.const -128 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 2 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 129 + global.set $optimize-instruction-regressions/x + global.get $optimize-instruction-regressions/x + i32.const 24 + i32.shl + i32.const 24 + i32.shr_u + i32.const -127 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 4 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + ) + (func $~start + call $start:optimize-instruction-regressions + ) +) From 90d82ab35a53dcdbc5b21e16b396957b75508ee5 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 29 Sep 2020 11:47:19 +0300 Subject: [PATCH 3/8] more --- ...mize-instruction-regressions.optimized.wat | 29 +++++++++++++++++++ .../optimize-instruction-regressions.ts | 5 ++++ ...mize-instruction-regressions.untouched.wat | 29 +++++++++++++++++++ 3 files changed, 63 insertions(+) diff --git a/tests/compiler/optimize-instruction-regressions.optimized.wat b/tests/compiler/optimize-instruction-regressions.optimized.wat index 29054a2133..5475697567 100644 --- a/tests/compiler/optimize-instruction-regressions.optimized.wat +++ b/tests/compiler/optimize-instruction-regressions.optimized.wat @@ -6,6 +6,7 @@ (data (i32.const 16) "F\00\00\00\01\00\00\00\01\00\00\00F\00\00\00o\00p\00t\00i\00m\00i\00z\00e\00-\00i\00n\00s\00t\00r\00u\00c\00t\00i\00o\00n\00-\00r\00e\00g\00r\00e\00s\00s\00i\00o\00n\00s\00.\00t\00s\00") (table $0 1 funcref) (global $optimize-instruction-regressions/x (mut i32) (i32.const 128)) + (global $optimize-instruction-regressions/y (mut i32) (i32.const 128)) (export "memory" (memory $0)) (start $~start) (func $start:optimize-instruction-regressions @@ -41,6 +42,34 @@ call $~lib/builtins/abort unreachable end + global.get $optimize-instruction-regressions/y + i32.const 255 + i32.and + i32.const -2147483648 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 7 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 129 + global.set $optimize-instruction-regressions/y + global.get $optimize-instruction-regressions/y + i32.const 255 + i32.and + i32.const -2147483648 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 9 + i32.const 1 + call $~lib/builtins/abort + unreachable + end ) (func $~start call $start:optimize-instruction-regressions diff --git a/tests/compiler/optimize-instruction-regressions.ts b/tests/compiler/optimize-instruction-regressions.ts index 8211c9c688..5574d1df54 100644 --- a/tests/compiler/optimize-instruction-regressions.ts +++ b/tests/compiler/optimize-instruction-regressions.ts @@ -2,3 +2,8 @@ let x: i32 = 128; assert(((x << 24) >> 24) == -128); x = 129; assert(((x << 24) >> 24) == -127); + +let y: u32 = 128; +assert(((y << 24) >> 24) == 128); +y = 129; +assert(((y << 24) >> 24) == 129); diff --git a/tests/compiler/optimize-instruction-regressions.untouched.wat b/tests/compiler/optimize-instruction-regressions.untouched.wat index 29054a2133..5475697567 100644 --- a/tests/compiler/optimize-instruction-regressions.untouched.wat +++ b/tests/compiler/optimize-instruction-regressions.untouched.wat @@ -6,6 +6,7 @@ (data (i32.const 16) "F\00\00\00\01\00\00\00\01\00\00\00F\00\00\00o\00p\00t\00i\00m\00i\00z\00e\00-\00i\00n\00s\00t\00r\00u\00c\00t\00i\00o\00n\00-\00r\00e\00g\00r\00e\00s\00s\00i\00o\00n\00s\00.\00t\00s\00") (table $0 1 funcref) (global $optimize-instruction-regressions/x (mut i32) (i32.const 128)) + (global $optimize-instruction-regressions/y (mut i32) (i32.const 128)) (export "memory" (memory $0)) (start $~start) (func $start:optimize-instruction-regressions @@ -41,6 +42,34 @@ call $~lib/builtins/abort unreachable end + global.get $optimize-instruction-regressions/y + i32.const 255 + i32.and + i32.const -2147483648 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 7 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 129 + global.set $optimize-instruction-regressions/y + global.get $optimize-instruction-regressions/y + i32.const 255 + i32.and + i32.const -2147483648 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 9 + i32.const 1 + call $~lib/builtins/abort + unreachable + end ) (func $~start call $start:optimize-instruction-regressions From e3f80e8e6e811b63cc47112a21c2cf24768bb2fb Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 29 Sep 2020 11:52:10 +0300 Subject: [PATCH 4/8] opcode renumbering --- src/module.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/module.ts b/src/module.ts index a265f28b20..b3c1ecb5e0 100644 --- a/src/module.ts +++ b/src/module.ts @@ -105,12 +105,12 @@ export enum ExpressionId { RefNull = 40 /* _BinaryenRefNullId */, RefIsNull = 41 /* _BinaryenRefIsNullId */, RefFunc = 42 /* _BinaryenRefFuncId */, - Try = 43 /* _BinaryenTryId */, - Throw = 44 /* _BinaryenThrowId */, - Rethrow = 45 /* _BinaryenRethrowId */, - BrOnExn = 46 /* _BinaryenBrOnExnId */, - TupleMake = 47 /* _BinaryenTupleMakeId */, - TupleExtract = 48 /* _BinaryenTupleExtractId */ + Try = 44 /* _BinaryenTryId */, + Throw = 45 /* _BinaryenThrowId */, + Rethrow = 46 /* _BinaryenRethrowId */, + BrOnExn = 47 /* _BinaryenBrOnExnId */, + TupleMake = 48 /* _BinaryenTupleMakeId */, + TupleExtract = 49 /* _BinaryenTupleExtractId */ } export enum UnaryOp { @@ -249,8 +249,8 @@ export enum BinaryOp { OrI32 = 8 /* _BinaryenOrInt32 */, XorI32 = 9 /* _BinaryenXorInt32 */, ShlI32 = 10 /* _BinaryenShlInt32 */, - ShrU32 = 11 /* _BinaryenShrUInt32 */, - ShrI32 = 12 /* _BinaryenShrSInt32 */, + ShrU32 = 12 /* _BinaryenShrUInt32 */, + ShrI32 = 11 /* _BinaryenShrSInt32 */, RotlI32 = 13 /* _BinaryenRotLInt32 */, RotrI32 = 14 /* _BinaryenRotRInt32 */, EqI32 = 15 /* _BinaryenEqInt32 */, @@ -274,8 +274,8 @@ export enum BinaryOp { OrI64 = 33 /* _BinaryenOrInt64 */, XorI64 = 34 /* _BinaryenXorInt64 */, ShlI64 = 35 /* _BinaryenShlInt64 */, - ShrU64 = 36 /* _BinaryenShrUInt64 */, - ShrI64 = 37 /* _BinaryenShrSInt64 */, + ShrU64 = 37 /* _BinaryenShrUInt64 */, + ShrI64 = 36 /* _BinaryenShrSInt64 */, RotlI64 = 38 /* _BinaryenRotLInt64 */, RotrI64 = 39 /* _BinaryenRotRInt64 */, EqI64 = 40 /* _BinaryenEqInt64 */, From d85d6b9eb2beb8b8db8cb94f4eb99cb8f9434ae7 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 29 Sep 2020 11:54:37 +0300 Subject: [PATCH 5/8] rebuild fixtures --- tests/compiler/abi.optimized.wat | 2 +- tests/compiler/abi.untouched.wat | 18 +- tests/compiler/binary.optimized.wat | 6 +- tests/compiler/binary.untouched.wat | 98 +- tests/compiler/builtins.optimized.wat | 876 ++++++++- tests/compiler/builtins.untouched.wat | 34 +- tests/compiler/call-super.optimized.wat | 2 +- tests/compiler/call-super.untouched.wat | 2 +- tests/compiler/class-implements.optimized.wat | 2 +- tests/compiler/class-implements.untouched.wat | 2 +- .../compiler/class-overloading.optimized.wat | 4 +- .../compiler/class-overloading.untouched.wat | 4 +- tests/compiler/class.optimized.wat | 2 +- tests/compiler/class.untouched.wat | 4 +- tests/compiler/const-folding.optimized.wat | 2 +- tests/compiler/const-folding.untouched.wat | 2 +- tests/compiler/constructor.optimized.wat | 2 +- tests/compiler/constructor.untouched.wat | 2 +- tests/compiler/do.optimized.wat | 10 +- tests/compiler/do.untouched.wat | 16 +- tests/compiler/exports.optimized.wat | 2 +- tests/compiler/exports.untouched.wat | 2 +- .../exportstar-rereexport.optimized.wat | 2 +- .../exportstar-rereexport.untouched.wat | 2 +- .../extends-baseaggregate.optimized.wat | 16 +- .../extends-baseaggregate.untouched.wat | 44 +- .../compiler/extends-recursive.untouched.wat | 2 +- .../field-initialization.optimized.wat | 4 +- .../field-initialization.untouched.wat | 4 +- tests/compiler/for.optimized.wat | 10 +- tests/compiler/for.untouched.wat | 16 +- tests/compiler/function-call.optimized.wat | 2 +- tests/compiler/function-call.untouched.wat | 2 +- .../function-expression.optimized.wat | 2 +- .../function-expression.untouched.wat | 2 +- tests/compiler/getter-call.optimized.wat | 2 +- tests/compiler/getter-call.untouched.wat | 2 +- .../implicit-getter-setter.optimized.wat | 14 +- .../implicit-getter-setter.untouched.wat | 16 +- tests/compiler/infer-array.optimized.wat | 2 +- tests/compiler/infer-array.untouched.wat | 26 +- tests/compiler/inlining.optimized.wat | 2 +- tests/compiler/inlining.untouched.wat | 2 +- tests/compiler/instanceof-class.optimized.wat | 2 +- tests/compiler/instanceof-class.untouched.wat | 2 +- tests/compiler/issues/1095.optimized.wat | 10 +- tests/compiler/issues/1095.untouched.wat | 16 +- tests/compiler/issues/1225.optimized.wat | 10 +- tests/compiler/issues/1225.untouched.wat | 16 +- tests/compiler/logical.optimized.wat | 10 +- tests/compiler/logical.untouched.wat | 16 +- tests/compiler/managed-cast.optimized.wat | 10 +- tests/compiler/managed-cast.untouched.wat | 16 +- tests/compiler/many-locals.optimized.wat | 2 +- tests/compiler/many-locals.untouched.wat | 2 +- tests/compiler/memcpy.optimized.wat | 24 +- tests/compiler/memcpy.untouched.wat | 24 +- tests/compiler/new.optimized.wat | 2 +- tests/compiler/new.untouched.wat | 2 +- tests/compiler/number.optimized.wat | 42 +- tests/compiler/number.untouched.wat | 74 +- tests/compiler/object-literal.optimized.wat | 16 +- tests/compiler/object-literal.untouched.wat | 42 +- ...mize-instruction-regressions.optimized.wat | 77 - .../optimize-instruction-regressions.ts | 9 - ...mize-instruction-regressions.untouched.wat | 77 - .../optional-typeparameters.optimized.wat | 2 +- .../optional-typeparameters.untouched.wat | 2 +- tests/compiler/overflow.optimized.wat | 12 - tests/compiler/overflow.untouched.wat | 36 +- .../portable-conversions.untouched.wat | 16 +- tests/compiler/rc/global-init.untouched.wat | 8 +- tests/compiler/rc/local-init.optimized.wat | 10 +- tests/compiler/rc/local-init.untouched.wat | 16 +- .../rc/logical-and-mismatch.optimized.wat | 10 +- .../rc/logical-and-mismatch.untouched.wat | 16 +- .../rc/logical-or-mismatch.optimized.wat | 10 +- .../rc/logical-or-mismatch.untouched.wat | 16 +- tests/compiler/rc/optimize.optimized.wat | 10 +- tests/compiler/rc/optimize.untouched.wat | 16 +- tests/compiler/rc/rereturn.optimized.wat | 14 +- tests/compiler/rc/rereturn.untouched.wat | 16 +- .../rc/ternary-mismatch.optimized.wat | 10 +- .../rc/ternary-mismatch.untouched.wat | 16 +- tests/compiler/reexport.optimized.wat | 2 +- tests/compiler/reexport.untouched.wat | 2 +- tests/compiler/rereexport.optimized.wat | 2 +- tests/compiler/rereexport.untouched.wat | 2 +- tests/compiler/resolve-access.optimized.wat | 2 +- tests/compiler/resolve-access.untouched.wat | 34 +- tests/compiler/resolve-binary.optimized.wat | 50 +- tests/compiler/resolve-binary.untouched.wat | 116 +- .../resolve-elementaccess.optimized.wat | 42 +- .../resolve-elementaccess.untouched.wat | 78 +- .../resolve-function-expression.optimized.wat | 6 +- .../resolve-function-expression.untouched.wat | 12 +- tests/compiler/resolve-nested.optimized.wat | 2 +- tests/compiler/resolve-nested.untouched.wat | 2 +- tests/compiler/resolve-new.optimized.wat | 2 +- tests/compiler/resolve-new.untouched.wat | 2 +- .../resolve-propertyaccess.optimized.wat | 6 +- .../resolve-propertyaccess.untouched.wat | 12 +- tests/compiler/resolve-ternary.optimized.wat | 52 +- tests/compiler/resolve-ternary.untouched.wat | 88 +- tests/compiler/resolve-unary.optimized.wat | 6 +- tests/compiler/resolve-unary.untouched.wat | 12 +- tests/compiler/retain-i32.optimized.wat | 12 +- tests/compiler/retain-i32.untouched.wat | 42 +- .../retain-release-sanity.optimized.wat | 18 +- .../retain-release-sanity.untouched.wat | 52 +- tests/compiler/retain-release.optimized.wat | 2 +- tests/compiler/retain-release.untouched.wat | 2 +- tests/compiler/retain-return.optimized.wat | 10 +- tests/compiler/retain-return.untouched.wat | 16 +- tests/compiler/rt/finalize.optimized.wat | 16 +- tests/compiler/rt/finalize.untouched.wat | 46 +- tests/compiler/rt/instanceof.optimized.wat | 2 +- tests/compiler/rt/instanceof.untouched.wat | 2 +- tests/compiler/rt/stub-realloc.optimized.wat | 2 +- tests/compiler/rt/stub-realloc.untouched.wat | 26 +- tests/compiler/runtime-full.optimized.wat | 14 +- tests/compiler/runtime-full.untouched.wat | 16 +- tests/compiler/runtime-stub.optimized.wat | 2 +- tests/compiler/runtime-stub.untouched.wat | 2 +- tests/compiler/std/array-access.optimized.wat | 2 +- tests/compiler/std/array-access.untouched.wat | 2 +- .../compiler/std/array-literal.optimized.wat | 14 +- .../compiler/std/array-literal.untouched.wat | 40 +- tests/compiler/std/array.optimized.wat | 182 +- tests/compiler/std/array.untouched.wat | 298 +-- tests/compiler/std/arraybuffer.optimized.wat | 16 +- tests/compiler/std/arraybuffer.untouched.wat | 42 +- tests/compiler/std/dataview.optimized.wat | 150 +- tests/compiler/std/dataview.untouched.wat | 96 +- tests/compiler/std/date.optimized.wat | 2 +- tests/compiler/std/date.untouched.wat | 2 +- tests/compiler/std/hash.optimized.wat | 2 +- tests/compiler/std/hash.untouched.wat | 22 +- tests/compiler/std/map.optimized.wat | 270 +-- tests/compiler/std/map.untouched.wat | 178 +- tests/compiler/std/math.optimized.wat | 430 ++-- tests/compiler/std/math.untouched.wat | 476 ++--- tests/compiler/std/mod.optimized.wat | 22 +- tests/compiler/std/mod.untouched.wat | 22 +- tests/compiler/std/new.optimized.wat | 2 +- tests/compiler/std/new.untouched.wat | 2 +- tests/compiler/std/object.optimized.wat | 2 +- tests/compiler/std/object.untouched.wat | 2 +- .../std/operator-overloading.optimized.wat | 12 +- .../std/operator-overloading.untouched.wat | 20 +- tests/compiler/std/pointer.untouched.wat | 24 +- tests/compiler/std/polyfills.untouched.wat | 40 +- tests/compiler/std/set.optimized.wat | 214 +- tests/compiler/std/set.untouched.wat | 138 +- tests/compiler/std/static-array.optimized.wat | 6 +- tests/compiler/std/static-array.untouched.wat | 30 +- tests/compiler/std/staticarray.optimized.wat | 16 +- tests/compiler/std/staticarray.untouched.wat | 42 +- .../std/string-casemapping.optimized.wat | 44 +- .../std/string-casemapping.untouched.wat | 82 +- .../std/string-encoding.optimized.wat | 18 +- .../std/string-encoding.untouched.wat | 56 +- tests/compiler/std/string.optimized.wat | 96 +- tests/compiler/std/string.untouched.wat | 138 +- tests/compiler/std/symbol.optimized.wat | 10 +- tests/compiler/std/symbol.untouched.wat | 34 +- tests/compiler/std/typedarray.optimized.wat | 1736 ++++++----------- tests/compiler/std/typedarray.untouched.wat | 330 ++-- tests/compiler/super-inline.optimized.wat | 2 +- tests/compiler/super-inline.untouched.wat | 2 +- tests/compiler/throw.untouched.wat | 8 +- tests/compiler/typeof.optimized.wat | 4 +- tests/compiler/typeof.untouched.wat | 4 +- tests/compiler/wasi/abort.optimized.wat | 2 +- tests/compiler/wasi/abort.untouched.wat | 14 +- tests/compiler/wasi/seed.optimized.wat | 20 +- tests/compiler/wasi/seed.untouched.wat | 32 +- tests/compiler/wasi/trace.optimized.wat | 36 +- tests/compiler/wasi/trace.untouched.wat | 78 +- tests/compiler/while.optimized.wat | 10 +- tests/compiler/while.untouched.wat | 16 +- 181 files changed, 4196 insertions(+), 4213 deletions(-) delete mode 100644 tests/compiler/optimize-instruction-regressions.optimized.wat delete mode 100644 tests/compiler/optimize-instruction-regressions.ts delete mode 100644 tests/compiler/optimize-instruction-regressions.untouched.wat diff --git a/tests/compiler/abi.optimized.wat b/tests/compiler/abi.optimized.wat index 1d79f41980..5898a8f83b 100644 --- a/tests/compiler/abi.optimized.wat +++ b/tests/compiler/abi.optimized.wat @@ -7,6 +7,6 @@ (export "exportedExported" (func $abi/exported)) (export "exportedInternal" (func $abi/exported)) (func $abi/exported (result i32) - i32.const 128 + i32.const -128 ) ) diff --git a/tests/compiler/abi.untouched.wat b/tests/compiler/abi.untouched.wat index fb76dec661..f540d255b1 100644 --- a/tests/compiler/abi.untouched.wat +++ b/tests/compiler/abi.untouched.wat @@ -30,7 +30,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eqz i32.eqz if @@ -49,7 +49,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 2 i32.div_s local.set $0 @@ -58,7 +58,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 2 i32.div_s local.set $0 @@ -67,7 +67,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eqz i32.eqz if @@ -86,9 +86,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 24 - i32.shr_u + i32.shr_s local.set $0 else local.get $0 @@ -111,7 +111,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s global.set $abi/y global.get $abi/y i32.eqz @@ -186,7 +186,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s ) (func $abi/exportedExported (result i32) call $abi/exported @@ -196,7 +196,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s ) (func $~start call $start:abi diff --git a/tests/compiler/binary.optimized.wat b/tests/compiler/binary.optimized.wat index bffe8abf65..818d1ff040 100644 --- a/tests/compiler/binary.optimized.wat +++ b/tests/compiler/binary.optimized.wat @@ -31,7 +31,7 @@ local.set $2 local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -81,11 +81,11 @@ global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_u + i32.shr_s global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_s + i32.shr_u global.set $binary/i global.get $binary/i i32.const 1 diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index cea159469e..a7a522d0ef 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -119,7 +119,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -137,7 +137,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -155,7 +155,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -173,7 +173,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -212,7 +212,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -339,11 +339,11 @@ local.set $6 local.get $5 i64.const 52 - i64.shr_s + i64.shr_u local.set $7 local.get $6 i64.const 52 - i64.shr_s + i64.shr_u local.set $8 local.get $7 i64.const 1 @@ -430,7 +430,7 @@ i64.lt_u local.get $6 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.eqz @@ -462,7 +462,7 @@ local.set $10 local.get $5 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 if (result i32) block $~lib/util/math/checkint|inlined.0 (result i32) @@ -470,7 +470,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $11 @@ -532,7 +532,7 @@ end local.get $6 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne if (result f64) @@ -546,7 +546,7 @@ end local.get $5 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne if @@ -555,7 +555,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $11 @@ -706,14 +706,14 @@ i64.const 52 i64.const 7 i64.sub - i64.shr_s + i64.shr_u i64.const 127 i64.and i32.wrap_i64 local.set $12 local.get $11 i64.const 52 - i64.shr_u + i64.shr_s local.set $13 local.get $9 local.get $11 @@ -932,7 +932,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2047 i32.and @@ -961,7 +961,7 @@ if local.get $9 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne if (result f64) @@ -1235,13 +1235,13 @@ local.set $3 local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $5 @@ -1322,7 +1322,7 @@ local.get $2 i32.const -1 i32.const 9 - i32.shr_s + i32.shr_u i32.and local.set $2 local.get $2 @@ -1354,7 +1354,7 @@ local.get $3 i32.const -1 i32.const 9 - i32.shr_s + i32.shr_u i32.and local.set $3 local.get $3 @@ -1454,7 +1454,7 @@ i32.sub i32.const 1 i32.add - i32.shr_s + i32.shr_u local.set $2 end local.get $2 @@ -1647,7 +1647,7 @@ i32.lt_u local.get $6 i32.const 31 - i32.shr_s + i32.shr_u i32.eqz i32.eq if @@ -1679,14 +1679,14 @@ local.set $9 local.get $5 i32.const 31 - i32.shr_s + i32.shr_u if (result i32) block $~lib/util/math/checkintf|inlined.0 (result i32) local.get $6 local.set $8 local.get $8 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $10 @@ -1744,7 +1744,7 @@ end local.get $6 i32.const 31 - i32.shr_s + i32.shr_u if (result f32) f32.const 1 local.get $9 @@ -1756,14 +1756,14 @@ end local.get $5 i32.const 31 - i32.shr_s + i32.shr_u if block $~lib/util/math/checkintf|inlined.1 (result i32) local.get $6 local.set $8 local.get $8 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $10 @@ -1866,7 +1866,7 @@ i32.const 23 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 15 i32.and local.set $11 @@ -1880,7 +1880,7 @@ local.set $13 local.get $12 i32.const 23 - i32.shr_u + i32.shr_s local.set $14 i32.const 6152 local.get $11 @@ -1961,7 +1961,7 @@ local.get $21 i64.reinterpret_f64 i64.const 47 - i64.shr_s + i64.shr_u i64.const 65535 i64.and i64.const 32959 @@ -2110,19 +2110,19 @@ local.set $3 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $4 local.get $3 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $5 local.get $2 i64.const 63 - i64.shr_s + i64.shr_u local.set $6 local.get $3 i64.const 1 @@ -2199,7 +2199,7 @@ local.get $2 i64.const -1 i64.const 12 - i64.shr_s + i64.shr_u i64.and local.set $2 local.get $2 @@ -2233,7 +2233,7 @@ local.get $3 i64.const -1 i64.const 12 - i64.shr_s + i64.shr_u i64.and local.set $3 local.get $3 @@ -2333,7 +2333,7 @@ i64.sub i64.const 1 i64.add - i64.shr_s + i64.shr_u local.set $2 end local.get $2 @@ -2400,11 +2400,11 @@ drop global.get $binary/i i32.const 1 - i32.shr_u + i32.shr_s drop global.get $binary/i i32.const 1 - i32.shr_s + i32.shr_u drop global.get $binary/i i32.const 1 @@ -2472,11 +2472,11 @@ global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_u + i32.shr_s global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_s + i32.shr_u global.set $binary/i global.get $binary/i i32.const 1 @@ -2512,11 +2512,11 @@ global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_u + i32.shr_s global.set $binary/i global.get $binary/i i32.const 1 - i32.shr_s + i32.shr_u global.set $binary/i global.get $binary/i i32.const 1 @@ -2585,11 +2585,11 @@ drop global.get $binary/I i64.const 1 - i64.shr_u + i64.shr_s drop global.get $binary/I i64.const 1 - i64.shr_s + i64.shr_u drop global.get $binary/I i64.const 1 @@ -2659,11 +2659,11 @@ global.set $binary/I global.get $binary/I i64.const 1 - i64.shr_u + i64.shr_s global.set $binary/I global.get $binary/I i64.const 1 - i64.shr_s + i64.shr_u global.set $binary/I global.get $binary/I i64.const 1 @@ -2699,11 +2699,11 @@ global.set $binary/I global.get $binary/I i64.const 1 - i64.shr_u + i64.shr_s global.set $binary/I global.get $binary/I i64.const 1 - i64.shr_s + i64.shr_u global.set $binary/I global.get $binary/I i64.const 1 diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 96fd84fdfd..1067470f8e 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -1,7 +1,12 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) (data (i32.const 1028) "\01\00\00\00\01") (data (i32.const 1040) "\06\00\00\00\01\00\00\00\01\00\00\00\06\00\00\00a\00b\00c") @@ -30,18 +35,877 @@ (data (i32.const 1856) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00s\00o\00m\00e\00 \00v\00a\00l\00u\00e") (data (i32.const 1904) "\08\00\00\00\01\00\00\00\0b\00\00\00\08\00\00\00\02") (data (i32.const 1936) "\08\00\00\00\01\00\00\00\0c\00\00\00\08\00\00\00\03") + (table $0 4 funcref) + (elem (i32.const 1) $start:builtins~anonymous|0 $start:builtins~anonymous|1 $start:builtins~anonymous|2) + (global $builtins/i (mut i32) (i32.const 0)) + (global $builtins/I (mut i64) (i64.const 0)) + (global $builtins/f (mut f32) (f32.const 0)) + (global $builtins/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) (export "test" (func $start:builtins~anonymous|1)) (start $~start) + (func $start:builtins~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + ) + (func $~lib/string/String#get:length (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $0 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $2 + i32.const 4 + i32.sub + local.tee $2 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $2 + local.tee $3 + i32.const 1 + i32.sub + local.set $2 + local.get $3 + if + local.get $0 + i32.load16_u + local.tee $3 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $3 + local.get $4 + i32.sub + return + end + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + block $folding-inner0 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + br_if $folding-inner0 + local.get $0 + call $~lib/string/String#get:length + local.tee $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + br_if $folding-inner0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + return + end + i32.const 0 + ) + (func $~lib/atomics/Atomics.isLockFree (param $0 i32) (result i32) + i32.const 1 + local.get $0 + i32.const 4 + i32.eq + i32.const 1 + local.get $0 + i32.const 2 + i32.eq + local.get $0 + i32.const 1 + i32.eq + select + select + ) (func $start:builtins~anonymous|1 nop ) - (func $~start + (func $start:builtins~anonymous|2 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + nop + ) + (func $start:builtins + i32.const 31 + global.set $builtins/i i32.const 0 - i32.const 1088 - i32.const 67 - i32.const 20 - call $~lib/builtins/abort - unreachable + global.set $builtins/i + i32.const 1 + global.set $builtins/i + i32.const 2 + global.set $builtins/i + i32.const -2147483648 + global.set $builtins/i + i32.const 42 + global.set $builtins/i + i32.const 2 + global.set $builtins/i + i32.const 1 + global.set $builtins/i + i64.const 63 + global.set $builtins/I + i64.const 0 + global.set $builtins/I + i64.const 1 + global.set $builtins/I + i64.const 2 + global.set $builtins/I + i64.const -9223372036854775808 + global.set $builtins/I + i64.const 42 + global.set $builtins/I + i64.const 2 + global.set $builtins/I + i64.const 1 + global.set $builtins/I + f32.const nan:0x400000 + global.set $builtins/f + f32.const inf + global.set $builtins/f + f32.const 1.25 + global.set $builtins/f + f32.const 2 + global.set $builtins/f + f32.const 1.25 + global.set $builtins/f + f32.const 1 + global.set $builtins/f + f32.const 2.5 + global.set $builtins/f + f32.const 1.25 + global.set $builtins/f + f32.const 1 + global.set $builtins/f + f32.const 1.1180340051651 + global.set $builtins/f + f32.const 1 + global.set $builtins/f + f64.const nan:0x8000000000000 + global.set $builtins/F + f64.const inf + global.set $builtins/F + f64.const 1.25 + global.set $builtins/F + f64.const 2 + global.set $builtins/F + f64.const 1.25 + global.set $builtins/F + f64.const 1 + global.set $builtins/F + f64.const 2.5 + global.set $builtins/F + f64.const 1.25 + global.set $builtins/F + f64.const 1 + global.set $builtins/F + f64.const 1.118033988749895 + global.set $builtins/F + f64.const 1 + global.set $builtins/F + f64.const 0 + global.set $builtins/F + f32.const 1 + global.set $builtins/f + i32.const 8 + i32.load + global.set $builtins/i + i32.const 8 + global.get $builtins/i + i32.store + i32.const 8 + i32.const 8 + i32.load + i32.store + i32.const 8 + i64.load + global.set $builtins/I + i32.const 8 + global.get $builtins/I + i64.store + i32.const 8 + i32.const 8 + i64.load + i64.store + i32.const 8 + f32.load + global.set $builtins/f + i32.const 8 + global.get $builtins/f + f32.store + i32.const 8 + i32.const 8 + f32.load + f32.store + i32.const 8 + f64.load + global.set $builtins/F + i32.const 8 + global.get $builtins/F + f64.store + i32.const 8 + i32.const 8 + f64.load + f64.store + i32.const 8 + i32.load + global.set $builtins/i + i32.const 8 + global.get $builtins/i + i32.store + i32.const 8 + i32.const 8 + i32.load + i32.store + i32.const 8 + i64.load + global.set $builtins/I + i32.const 8 + global.get $builtins/I + i64.store + i32.const 8 + i32.const 8 + i64.load + i64.store + i32.const 8 + f32.load + global.set $builtins/f + i32.const 8 + global.get $builtins/f + f32.store + i32.const 8 + i32.const 8 + f32.load + f32.store + i32.const 8 + f64.load + global.set $builtins/F + i32.const 8 + global.get $builtins/F + f64.store + i32.const 8 + i32.const 8 + f64.load + f64.store + i32.const 8 + i32.load8_s + global.set $builtins/i + i32.const 8 + i32.load16_s + global.set $builtins/i + i32.const 8 + i32.load + global.set $builtins/i + i32.const 8 + i32.load8_u + global.set $builtins/i + i32.const 8 + i32.load16_u + global.set $builtins/i + i32.const 8 + i32.load + global.set $builtins/i + i32.const 8 + i32.load8_u + drop + i32.const 8 + i32.load16_u + drop + i32.const 8 + i32.load + drop + i32.const 8 + i32.load8_s + drop + i32.const 8 + i32.load16_s + drop + i32.const 8 + i32.load + drop + i32.const 8 + i64.load8_s + global.set $builtins/I + i32.const 8 + i64.load16_s + global.set $builtins/I + i32.const 8 + i64.load32_s + global.set $builtins/I + i32.const 8 + i64.load + global.set $builtins/I + i32.const 8 + i64.load8_u + drop + i32.const 8 + i64.load16_u + drop + i32.const 8 + i64.load32_u + drop + i32.const 8 + i64.load + drop + i32.const 8 + i32.const 1 + i32.store8 + i32.const 8 + i32.const 1 + i32.store16 + i32.const 8 + i32.const 1 + i32.store + i32.const 8 + i64.const 1 + i64.store8 + i32.const 8 + i64.const 1 + i64.store16 + i32.const 8 + i64.const 1 + i64.store32 + i32.const 8 + i64.const 1 + i64.store + i32.const 8 + i64.const 1 + i64.store + i32.const 1067450368 + global.set $builtins/i + f32.const 3.5032461608120427e-44 + global.set $builtins/f + i64.const 4608308318706860032 + global.set $builtins/I + f64.const 1.24e-322 + global.set $builtins/F + memory.size + drop + i32.const 1 + memory.grow + drop + memory.size + drop + i32.const 1 + memory.grow + drop + i32.const 10 + global.set $builtins/i + i64.const 200 + global.set $builtins/I + f32.const 1.25 + global.set $builtins/f + f64.const 25 + global.set $builtins/F + i32.const 1 + i32.const 2 + i32.const 1136 + i32.load + call_indirect (type $i32_i32_=>_i32) + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 265 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + i32.const 3 + i32.const 1136 + i32.load + call_indirect (type $i32_i32_=>_i32) + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 266 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 1040 + i32.const 1040 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 267 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 1168 + i32.const 1168 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 270 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 8 + i32.load8_s + drop + i32.const 8 + i32.load8_u + drop + i32.const 8 + i32.load16_s + drop + i32.const 8 + i32.load16_u + drop + i32.const 8 + i32.load + drop + i32.const 8 + i64.load8_s + drop + i32.const 8 + i64.load8_u + drop + i32.const 8 + i64.load16_s + drop + i32.const 8 + i64.load16_u + drop + i32.const 8 + i64.load32_s + drop + i32.const 8 + i64.load32_u + drop + i32.const 8 + i64.load + drop + i32.const 8 + f32.load + drop + i32.const 8 + f64.load + drop + i32.const 8 + i32.const 1 + i32.store8 + i32.const 8 + i32.const 1 + i32.store16 + i32.const 8 + i32.const 1 + i32.store + i32.const 8 + i64.const 1 + i64.store8 + i32.const 8 + i64.const 1 + i64.store16 + i32.const 8 + i64.const 1 + i64.store32 + i32.const 8 + i64.const 1 + i64.store + i32.const 8 + f32.const 1 + f32.store + i32.const 8 + f64.const 1 + f64.store + i32.const 0 + call $~lib/atomics/Atomics.isLockFree + if + i32.const 0 + i32.const 1088 + i32.const 432 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $~lib/atomics/Atomics.isLockFree + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 433 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + call $~lib/atomics/Atomics.isLockFree + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 434 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 3 + call $~lib/atomics/Atomics.isLockFree + if + i32.const 0 + i32.const 1088 + i32.const 435 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 4 + call $~lib/atomics/Atomics.isLockFree + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1088 + i32.const 436 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 5 + call $~lib/atomics/Atomics.isLockFree + if + i32.const 0 + i32.const 1088 + i32.const 437 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 8 + call $~lib/atomics/Atomics.isLockFree + if + i32.const 0 + i32.const 1088 + i32.const 438 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + i32.const 1248 + i32.const 5 + f64.const 0 + f64.const 0 + f64.const 25 + f64.const 26 + f64.const 26 + call $~lib/builtins/trace + i32.const 1328 + i32.const 1328 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 455 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1328 + i32.const 1328 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 456 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1360 + i32.const 1360 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 457 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1392 + i32.const 1392 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 458 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1424 + i32.const 1424 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 459 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1456 + i32.const 1456 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 460 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1488 + i32.const 1488 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 461 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1520 + i32.const 1520 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 462 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1552 + i32.const 1552 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 463 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1584 + i32.const 1584 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 464 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1616 + i32.const 1616 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 465 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1648 + i32.const 1648 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 466 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1680 + i32.const 1680 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 467 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1712 + i32.const 1712 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 468 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1744 + i32.const 1744 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 469 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1776 + i32.const 1776 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 470 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1808 + i32.const 1808 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 471 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1840 + i32.const 1840 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 472 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1392 + i32.const 1392 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 473 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1328 + i32.const 1328 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 474 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + ) + (func $~start + call $start:builtins ) ) diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index 8211d94a4f..9573100c47 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -107,7 +107,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -463,7 +463,7 @@ i32.const -42 local.tee $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $1 local.get $0 i32.add @@ -508,7 +508,7 @@ i32.const -42 local.tee $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $1 local.get $0 i32.add @@ -589,7 +589,7 @@ i64.const -42 local.tee $2 i64.const 63 - i64.shr_u + i64.shr_s local.tee $3 local.get $2 i64.add @@ -616,7 +616,7 @@ i64.const -42 local.tee $2 i64.const 63 - i64.shr_u + i64.shr_s local.tee $3 local.get $2 i64.add @@ -1440,17 +1440,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq - i32.eqz - if - i32.const 0 - i32.const 80 - i32.const 324 - i32.const 1 - call $~lib/builtins/abort - unreachable - end + drop global.get $~lib/builtins/i8.MAX_VALUE i32.const 127 i32.eq @@ -1460,17 +1452,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eq - i32.eqz - if - i32.const 0 - i32.const 80 - i32.const 326 - i32.const 1 - call $~lib/builtins/abort - unreachable - end + drop global.get $~lib/builtins/i16.MAX_VALUE i32.const 32767 i32.eq diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index bad2229b08..1013cc11c3 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -54,7 +54,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 7979c0ef46..ebf78de487 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -39,7 +39,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/class-implements.optimized.wat b/tests/compiler/class-implements.optimized.wat index fba04e57e2..28eafbd5a4 100644 --- a/tests/compiler/class-implements.optimized.wat +++ b/tests/compiler/class-implements.optimized.wat @@ -41,7 +41,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/class-implements.untouched.wat b/tests/compiler/class-implements.untouched.wat index fc36ea6c9a..b7ab1b4de0 100644 --- a/tests/compiler/class-implements.untouched.wat +++ b/tests/compiler/class-implements.untouched.wat @@ -48,7 +48,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index 5c21fae2a7..9f337184e4 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -51,7 +51,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 @@ -111,7 +111,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/class-overloading.untouched.wat b/tests/compiler/class-overloading.untouched.wat index cf203f6f89..ff606fff0b 100644 --- a/tests/compiler/class-overloading.untouched.wat +++ b/tests/compiler/class-overloading.untouched.wat @@ -55,7 +55,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -186,7 +186,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index c0a0d4da14..2b4cd885ea 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -77,7 +77,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index 43ef13a19d..e0c7e9799a 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -154,7 +154,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -480,7 +480,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 diff --git a/tests/compiler/const-folding.optimized.wat b/tests/compiler/const-folding.optimized.wat index 22d5595a45..14b4c71317 100644 --- a/tests/compiler/const-folding.optimized.wat +++ b/tests/compiler/const-folding.optimized.wat @@ -9,7 +9,7 @@ i64.shl local.get $0 i64.const 63 - i64.shr_s + i64.shr_u i64.add ) ) diff --git a/tests/compiler/const-folding.untouched.wat b/tests/compiler/const-folding.untouched.wat index d881c08318..251ac9f6a8 100644 --- a/tests/compiler/const-folding.untouched.wat +++ b/tests/compiler/const-folding.untouched.wat @@ -32,7 +32,7 @@ local.get $4 local.get $0 i64.const 63 - i64.shr_s + i64.shr_u local.get $1 i64.and i64.or diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index f439f0a27c..bde23d72a2 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -51,7 +51,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index 0bd1a317f7..a733d1484f 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -47,7 +47,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index fd0b61ca02..565621a65f 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -150,7 +150,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -161,7 +161,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -451,7 +451,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -462,7 +462,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -846,7 +846,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index 70f7c60471..eacfebc0d4 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -503,7 +503,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -515,7 +515,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -889,7 +889,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -901,7 +901,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1214,7 +1214,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1378,7 +1378,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1408,7 +1408,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1598,7 +1598,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index d071443a1a..d935ff06e9 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -88,7 +88,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 1e59ed7c38..642deb6a97 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -97,7 +97,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/exportstar-rereexport.optimized.wat b/tests/compiler/exportstar-rereexport.optimized.wat index 7bc738b532..606338749d 100644 --- a/tests/compiler/exportstar-rereexport.optimized.wat +++ b/tests/compiler/exportstar-rereexport.optimized.wat @@ -68,7 +68,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $3 local.get $2 diff --git a/tests/compiler/exportstar-rereexport.untouched.wat b/tests/compiler/exportstar-rereexport.untouched.wat index 2abb4ad2d8..57c3341551 100644 --- a/tests/compiler/exportstar-rereexport.untouched.wat +++ b/tests/compiler/exportstar-rereexport.untouched.wat @@ -78,7 +78,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index d6c8b980b7..a67611b82c 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -75,7 +75,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -86,7 +86,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -376,7 +376,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -387,7 +387,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -703,7 +703,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -730,7 +730,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -963,7 +963,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1612,7 +1612,7 @@ i32.load local.tee $3 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $0 diff --git a/tests/compiler/extends-baseaggregate.untouched.wat b/tests/compiler/extends-baseaggregate.untouched.wat index 42f572bd17..664c7a63fa 100644 --- a/tests/compiler/extends-baseaggregate.untouched.wat +++ b/tests/compiler/extends-baseaggregate.untouched.wat @@ -100,7 +100,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -112,7 +112,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -486,7 +486,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -498,7 +498,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -811,7 +811,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -975,7 +975,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1005,7 +1005,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1195,7 +1195,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1874,7 +1874,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1890,7 +1890,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1906,7 +1906,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1922,7 +1922,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1995,7 +1995,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2011,7 +2011,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2027,7 +2027,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2043,7 +2043,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2102,7 +2102,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2118,7 +2118,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2134,7 +2134,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2150,7 +2150,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -3232,13 +3232,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 288 diff --git a/tests/compiler/extends-recursive.untouched.wat b/tests/compiler/extends-recursive.untouched.wat index 102eeab2a2..06d2040bd3 100644 --- a/tests/compiler/extends-recursive.untouched.wat +++ b/tests/compiler/extends-recursive.untouched.wat @@ -41,7 +41,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/field-initialization.optimized.wat b/tests/compiler/field-initialization.optimized.wat index feb896e8fe..6f20599bb8 100644 --- a/tests/compiler/field-initialization.optimized.wat +++ b/tests/compiler/field-initialization.optimized.wat @@ -64,7 +64,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 @@ -141,7 +141,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/field-initialization.untouched.wat b/tests/compiler/field-initialization.untouched.wat index f7b219d53a..0517dcbf9c 100644 --- a/tests/compiler/field-initialization.untouched.wat +++ b/tests/compiler/field-initialization.untouched.wat @@ -49,7 +49,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -704,7 +704,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index ae73a59a06..8680bc669c 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -147,7 +147,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -158,7 +158,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -448,7 +448,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -459,7 +459,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -843,7 +843,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index e161208601..3ea1d01e04 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -516,7 +516,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -528,7 +528,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -902,7 +902,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -914,7 +914,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1227,7 +1227,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1391,7 +1391,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1421,7 +1421,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1611,7 +1611,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/function-call.optimized.wat b/tests/compiler/function-call.optimized.wat index 3f3af47c25..b83d0ceef2 100644 --- a/tests/compiler/function-call.optimized.wat +++ b/tests/compiler/function-call.optimized.wat @@ -108,7 +108,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $0 local.get $1 local.get $0 diff --git a/tests/compiler/function-call.untouched.wat b/tests/compiler/function-call.untouched.wat index a3ecc55d1e..9c92a36153 100644 --- a/tests/compiler/function-call.untouched.wat +++ b/tests/compiler/function-call.untouched.wat @@ -75,7 +75,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 5c53e6a7ba..9384556cdd 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -244,7 +244,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $0 local.get $1 local.get $0 diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index fe431b4ac0..c59cfba85b 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -253,7 +253,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 203090482a..e809d8a045 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -40,7 +40,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $1 local.get $2 local.get $1 diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 1786321fbf..9397fc74a6 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -41,7 +41,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index de5a3eeda9..9c33c3adf4 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -82,7 +82,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -93,7 +93,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -383,7 +383,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -394,7 +394,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -686,7 +686,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -713,7 +713,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -965,7 +965,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 diff --git a/tests/compiler/implicit-getter-setter.untouched.wat b/tests/compiler/implicit-getter-setter.untouched.wat index 26a89e87f0..906a0165ec 100644 --- a/tests/compiler/implicit-getter-setter.untouched.wat +++ b/tests/compiler/implicit-getter-setter.untouched.wat @@ -104,7 +104,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -116,7 +116,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -490,7 +490,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -502,7 +502,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -815,7 +815,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -979,7 +979,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1009,7 +1009,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1199,7 +1199,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index b1a39c4109..ebe9642e9f 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -74,7 +74,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/infer-array.untouched.wat b/tests/compiler/infer-array.untouched.wat index cfe2e7fc0d..6ee473ce24 100644 --- a/tests/compiler/infer-array.untouched.wat +++ b/tests/compiler/infer-array.untouched.wat @@ -61,7 +61,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -408,7 +408,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -424,7 +424,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -440,7 +440,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -456,7 +456,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -529,7 +529,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -545,7 +545,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -561,7 +561,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -577,7 +577,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -636,7 +636,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -652,7 +652,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -668,7 +668,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -684,7 +684,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index b401270ea2..40b5a9b781 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -66,7 +66,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 31ec407ce8..50202075bc 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -247,7 +247,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index 933be51a84..e1d5c7c1c4 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -39,7 +39,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/instanceof-class.untouched.wat b/tests/compiler/instanceof-class.untouched.wat index 6f98a66b04..67f434a05b 100644 --- a/tests/compiler/instanceof-class.untouched.wat +++ b/tests/compiler/instanceof-class.untouched.wat @@ -43,7 +43,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 9ff060e37c..4913000374 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -67,7 +67,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -78,7 +78,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -368,7 +368,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -379,7 +379,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -763,7 +763,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/issues/1095.untouched.wat b/tests/compiler/issues/1095.untouched.wat index 432f4ccb48..63f4eb361c 100644 --- a/tests/compiler/issues/1095.untouched.wat +++ b/tests/compiler/issues/1095.untouched.wat @@ -91,7 +91,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -103,7 +103,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -477,7 +477,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -489,7 +489,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -802,7 +802,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -966,7 +966,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -996,7 +996,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1186,7 +1186,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/issues/1225.optimized.wat b/tests/compiler/issues/1225.optimized.wat index 2413ed8337..717e09b3a0 100644 --- a/tests/compiler/issues/1225.optimized.wat +++ b/tests/compiler/issues/1225.optimized.wat @@ -68,7 +68,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -79,7 +79,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -369,7 +369,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -380,7 +380,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -764,7 +764,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/issues/1225.untouched.wat b/tests/compiler/issues/1225.untouched.wat index ac3376bb56..ee99447b69 100644 --- a/tests/compiler/issues/1225.untouched.wat +++ b/tests/compiler/issues/1225.untouched.wat @@ -92,7 +92,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -104,7 +104,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -478,7 +478,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -490,7 +490,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -803,7 +803,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -967,7 +967,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -997,7 +997,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1187,7 +1187,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index ca27ec7a3f..ce3a0a2d5d 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -65,7 +65,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -76,7 +76,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -366,7 +366,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -377,7 +377,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -761,7 +761,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index 58be2776f0..5ce7daa94c 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -114,7 +114,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -126,7 +126,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -500,7 +500,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -512,7 +512,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -825,7 +825,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -989,7 +989,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1019,7 +1019,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1209,7 +1209,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 88aa757c48..ba0ca816f5 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -70,7 +70,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -81,7 +81,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -371,7 +371,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -382,7 +382,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -765,7 +765,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $2 local.get $3 diff --git a/tests/compiler/managed-cast.untouched.wat b/tests/compiler/managed-cast.untouched.wat index 6a45af405f..5f6f58c1b2 100644 --- a/tests/compiler/managed-cast.untouched.wat +++ b/tests/compiler/managed-cast.untouched.wat @@ -94,7 +94,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -106,7 +106,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -480,7 +480,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -492,7 +492,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -805,7 +805,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -969,7 +969,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -999,7 +999,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1189,7 +1189,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/many-locals.optimized.wat b/tests/compiler/many-locals.optimized.wat index 1899b062f7..4c9f7826dd 100644 --- a/tests/compiler/many-locals.optimized.wat +++ b/tests/compiler/many-locals.optimized.wat @@ -17,7 +17,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s ) (func $~start i32.const 42 diff --git a/tests/compiler/many-locals.untouched.wat b/tests/compiler/many-locals.untouched.wat index 83b66c5631..8e2517e717 100644 --- a/tests/compiler/many-locals.untouched.wat +++ b/tests/compiler/many-locals.untouched.wat @@ -786,7 +786,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s ) (func $start:many-locals i32.const 42 diff --git a/tests/compiler/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index 639aac6503..c55ff71226 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -216,13 +216,13 @@ i32.shl local.get $6 i32.const 24 - i32.shr_s + i32.shr_u i32.or i32.store local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $1 i32.load offset=5 local.tee $3 @@ -233,7 +233,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $1 i32.load offset=9 local.tee $3 @@ -249,7 +249,7 @@ i32.shl local.get $3 i32.const 24 - i32.shr_s + i32.shr_u i32.or i32.store offset=12 local.get $1 @@ -307,13 +307,13 @@ i32.shl local.get $6 i32.const 16 - i32.shr_s + i32.shr_u i32.or i32.store local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $1 i32.load offset=6 local.tee $3 @@ -324,7 +324,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $1 i32.load offset=10 local.tee $3 @@ -340,7 +340,7 @@ i32.shl local.get $3 i32.const 16 - i32.shr_s + i32.shr_u i32.or i32.store offset=12 local.get $1 @@ -394,13 +394,13 @@ i32.shl local.get $6 i32.const 8 - i32.shr_s + i32.shr_u i32.or i32.store local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $1 i32.load offset=7 local.tee $3 @@ -411,7 +411,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $1 i32.load offset=11 local.tee $3 @@ -427,7 +427,7 @@ i32.shl local.get $3 i32.const 8 - i32.shr_s + i32.shr_u i32.or i32.store offset=12 local.get $1 diff --git a/tests/compiler/memcpy.untouched.wat b/tests/compiler/memcpy.untouched.wat index 8e02fcb182..73835e9b4b 100644 --- a/tests/compiler/memcpy.untouched.wat +++ b/tests/compiler/memcpy.untouched.wat @@ -279,7 +279,7 @@ local.get $0 local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $5 i32.const 8 i32.shl @@ -295,7 +295,7 @@ i32.add local.get $5 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -311,7 +311,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $5 i32.const 8 i32.shl @@ -327,7 +327,7 @@ i32.add local.get $5 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -400,7 +400,7 @@ local.get $0 local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $5 i32.const 16 i32.shl @@ -416,7 +416,7 @@ i32.add local.get $5 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -432,7 +432,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $5 i32.const 16 i32.shl @@ -448,7 +448,7 @@ i32.add local.get $5 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -507,7 +507,7 @@ local.get $0 local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $5 i32.const 24 i32.shl @@ -523,7 +523,7 @@ i32.add local.get $5 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -539,7 +539,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $5 i32.const 24 i32.shl @@ -555,7 +555,7 @@ i32.add local.get $5 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index 3f4eda1264..dc79afe700 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -33,7 +33,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $3 local.get $2 diff --git a/tests/compiler/new.untouched.wat b/tests/compiler/new.untouched.wat index 312cc0f5de..a43342cf59 100644 --- a/tests/compiler/new.untouched.wat +++ b/tests/compiler/new.untouched.wat @@ -39,7 +39,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index b11b72c29e..6d8c3d16e2 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -127,7 +127,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 @@ -200,7 +200,7 @@ if (result i32) local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $1 if i32.const 0 @@ -237,7 +237,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -376,7 +376,7 @@ local.get $3 local.get $10 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -623,7 +623,7 @@ i64.mul local.tee $3 local.get $1 - i64.shr_s + i64.shr_u local.tee $7 local.get $6 i64.extend_i32_s @@ -1165,34 +1165,34 @@ global.get $~lib/util/number/_frc_pow local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u local.set $3 local.get $2 i64.const 4294967295 i64.and local.tee $2 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl local.get $2 i64.const 10 i64.shl i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $1 local.get $0 local.get $0 local.get $3 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl local.get $2 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl i64.const 0 i64.add local.tee $5 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $5 i64.const 4294967295 @@ -1209,11 +1209,11 @@ i32.const 2 i32.add local.get $3 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $1 i64.const 4294967295 @@ -1225,7 +1225,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.sub @@ -1244,11 +1244,11 @@ i64.const 4294966784 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $1 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $3 i64.const 4294966784 @@ -1260,7 +1260,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.add diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 5ac89310e6..19adb60dc9 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -146,7 +146,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -399,7 +399,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -544,7 +544,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -627,7 +627,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $2 if @@ -677,7 +677,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -751,7 +751,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -994,7 +994,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $11 local.get $3 @@ -1315,7 +1315,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u local.set $22 local.get $22 local.get $14 @@ -1716,7 +1716,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1732,7 +1732,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1748,7 +1748,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1764,7 +1764,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1837,7 +1837,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1853,7 +1853,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -1869,7 +1869,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1885,7 +1885,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -1944,7 +1944,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -1960,7 +1960,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -1976,7 +1976,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -1992,7 +1992,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -3084,7 +3084,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $7 local.get $6 @@ -3183,7 +3183,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $14 @@ -3238,11 +3238,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -3253,7 +3253,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -3270,11 +3270,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $24 i64.const 32 - i64.shr_s + i64.shr_u local.set $24 local.get $20 local.get $21 @@ -3308,11 +3308,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $23 local.get $22 @@ -3323,7 +3323,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $18 local.get $23 @@ -3340,11 +3340,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_s + i64.shr_u local.set $18 local.get $25 i64.const 32 - i64.shr_s + i64.shr_u local.set $25 local.get $21 local.get $20 @@ -3380,11 +3380,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -3395,7 +3395,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -3412,11 +3412,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $27 i64.const 32 - i64.shr_s + i64.shr_u local.set $27 local.get $20 local.get $21 diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index a7ffc1235e..42a5e9eaa8 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -74,7 +74,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -85,7 +85,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -375,7 +375,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -386,7 +386,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -678,7 +678,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -705,7 +705,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -957,7 +957,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1110,7 +1110,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 59e4c42b09..770147500f 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -98,7 +98,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -110,7 +110,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -484,7 +484,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -496,7 +496,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -809,7 +809,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -973,7 +973,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1003,7 +1003,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1193,7 +1193,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1563,7 +1563,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -2061,7 +2061,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2077,7 +2077,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2093,7 +2093,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2109,7 +2109,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2182,7 +2182,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2198,7 +2198,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2214,7 +2214,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2230,7 +2230,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2289,7 +2289,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2305,7 +2305,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2321,7 +2321,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2337,7 +2337,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/optimize-instruction-regressions.optimized.wat b/tests/compiler/optimize-instruction-regressions.optimized.wat deleted file mode 100644 index 5475697567..0000000000 --- a/tests/compiler/optimize-instruction-regressions.optimized.wat +++ /dev/null @@ -1,77 +0,0 @@ -(module - (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 16) "F\00\00\00\01\00\00\00\01\00\00\00F\00\00\00o\00p\00t\00i\00m\00i\00z\00e\00-\00i\00n\00s\00t\00r\00u\00c\00t\00i\00o\00n\00-\00r\00e\00g\00r\00e\00s\00s\00i\00o\00n\00s\00.\00t\00s\00") - (table $0 1 funcref) - (global $optimize-instruction-regressions/x (mut i32) (i32.const 128)) - (global $optimize-instruction-regressions/y (mut i32) (i32.const 128)) - (export "memory" (memory $0)) - (start $~start) - (func $start:optimize-instruction-regressions - global.get $optimize-instruction-regressions/x - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u - i32.const -128 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 2 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 129 - global.set $optimize-instruction-regressions/x - global.get $optimize-instruction-regressions/x - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u - i32.const -127 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 4 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $optimize-instruction-regressions/y - i32.const 255 - i32.and - i32.const -2147483648 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 7 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 129 - global.set $optimize-instruction-regressions/y - global.get $optimize-instruction-regressions/y - i32.const 255 - i32.and - i32.const -2147483648 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 9 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - ) - (func $~start - call $start:optimize-instruction-regressions - ) -) diff --git a/tests/compiler/optimize-instruction-regressions.ts b/tests/compiler/optimize-instruction-regressions.ts deleted file mode 100644 index 5574d1df54..0000000000 --- a/tests/compiler/optimize-instruction-regressions.ts +++ /dev/null @@ -1,9 +0,0 @@ -let x: i32 = 128; -assert(((x << 24) >> 24) == -128); -x = 129; -assert(((x << 24) >> 24) == -127); - -let y: u32 = 128; -assert(((y << 24) >> 24) == 128); -y = 129; -assert(((y << 24) >> 24) == 129); diff --git a/tests/compiler/optimize-instruction-regressions.untouched.wat b/tests/compiler/optimize-instruction-regressions.untouched.wat deleted file mode 100644 index 5475697567..0000000000 --- a/tests/compiler/optimize-instruction-regressions.untouched.wat +++ /dev/null @@ -1,77 +0,0 @@ -(module - (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 16) "F\00\00\00\01\00\00\00\01\00\00\00F\00\00\00o\00p\00t\00i\00m\00i\00z\00e\00-\00i\00n\00s\00t\00r\00u\00c\00t\00i\00o\00n\00-\00r\00e\00g\00r\00e\00s\00s\00i\00o\00n\00s\00.\00t\00s\00") - (table $0 1 funcref) - (global $optimize-instruction-regressions/x (mut i32) (i32.const 128)) - (global $optimize-instruction-regressions/y (mut i32) (i32.const 128)) - (export "memory" (memory $0)) - (start $~start) - (func $start:optimize-instruction-regressions - global.get $optimize-instruction-regressions/x - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u - i32.const -128 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 2 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 129 - global.set $optimize-instruction-regressions/x - global.get $optimize-instruction-regressions/x - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u - i32.const -127 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 4 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - global.get $optimize-instruction-regressions/y - i32.const 255 - i32.and - i32.const -2147483648 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 7 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 129 - global.set $optimize-instruction-regressions/y - global.get $optimize-instruction-regressions/y - i32.const 255 - i32.and - i32.const -2147483648 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 9 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - ) - (func $~start - call $start:optimize-instruction-regressions - ) -) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index e1aa7c2d1b..560fcc8178 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -33,7 +33,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $3 local.get $2 diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 277649f998..0e4f058695 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -46,7 +46,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/overflow.optimized.wat b/tests/compiler/overflow.optimized.wat index f91c8b53f3..2f847eda83 100644 --- a/tests/compiler/overflow.optimized.wat +++ b/tests/compiler/overflow.optimized.wat @@ -1,17 +1,5 @@ (module - (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\16\00\00\00\01\00\00\00\01\00\00\00\16\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") (export "memory" (memory $0)) - (start $~start) - (func $~start - i32.const 0 - i32.const 1040 - i32.const 10 - i32.const 3 - call $~lib/builtins/abort - unreachable - ) ) diff --git a/tests/compiler/overflow.untouched.wat b/tests/compiler/overflow.untouched.wat index 441e9ab809..4b9a74b4cb 100644 --- a/tests/compiler/overflow.untouched.wat +++ b/tests/compiler/overflow.untouched.wat @@ -21,7 +21,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const -128 i32.eq i32.eqz @@ -41,7 +41,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 127 i32.eq i32.eqz @@ -64,7 +64,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const -128 i32.eq i32.eqz @@ -87,7 +87,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 127 i32.eq i32.eqz @@ -107,7 +107,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const -128 i32.eq i32.eqz @@ -127,7 +127,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 127 i32.eq i32.eqz @@ -148,7 +148,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const -128 i32.eq i32.eqz @@ -169,7 +169,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 127 i32.eq i32.eqz @@ -187,7 +187,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const -128 i32.eq i32.eqz @@ -209,7 +209,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -32768 i32.eq i32.eqz @@ -229,7 +229,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 32767 i32.eq i32.eqz @@ -252,7 +252,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -32768 i32.eq i32.eqz @@ -275,7 +275,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 32767 i32.eq i32.eqz @@ -295,7 +295,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -32768 i32.eq i32.eqz @@ -315,7 +315,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 32767 i32.eq i32.eqz @@ -336,7 +336,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -32768 i32.eq i32.eqz @@ -357,7 +357,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 32767 i32.eq i32.eqz @@ -375,7 +375,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -32768 i32.eq i32.eqz diff --git a/tests/compiler/portable-conversions.untouched.wat b/tests/compiler/portable-conversions.untouched.wat index 1a3dbd99c2..6d00acc97a 100644 --- a/tests/compiler/portable-conversions.untouched.wat +++ b/tests/compiler/portable-conversions.untouched.wat @@ -16,7 +16,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eqz if i32.const 0 @@ -31,7 +31,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eqz if i32.const 0 @@ -46,7 +46,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eqz if i32.const 0 @@ -61,7 +61,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eqz if i32.const 0 @@ -75,7 +75,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eqz if i32.const 0 @@ -90,7 +90,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eqz if i32.const 0 @@ -105,7 +105,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eqz if i32.const 0 @@ -120,7 +120,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eqz if i32.const 0 diff --git a/tests/compiler/rc/global-init.untouched.wat b/tests/compiler/rc/global-init.untouched.wat index f869684d4a..bcb9c93bde 100644 --- a/tests/compiler/rc/global-init.untouched.wat +++ b/tests/compiler/rc/global-init.untouched.wat @@ -201,7 +201,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -213,7 +213,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -587,7 +587,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -599,7 +599,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index f5fd6e2105..a3e22c6a0e 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -65,7 +65,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -76,7 +76,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -366,7 +366,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -377,7 +377,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -761,7 +761,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/rc/local-init.untouched.wat b/tests/compiler/rc/local-init.untouched.wat index c439fc4f07..05fbb2d944 100644 --- a/tests/compiler/rc/local-init.untouched.wat +++ b/tests/compiler/rc/local-init.untouched.wat @@ -103,7 +103,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -115,7 +115,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -489,7 +489,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -501,7 +501,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -814,7 +814,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -978,7 +978,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1008,7 +1008,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1198,7 +1198,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index b577148d99..ed8cf871e1 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -65,7 +65,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -76,7 +76,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -366,7 +366,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -377,7 +377,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -761,7 +761,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/rc/logical-and-mismatch.untouched.wat b/tests/compiler/rc/logical-and-mismatch.untouched.wat index c038ce1f5f..8bc73c87c9 100644 --- a/tests/compiler/rc/logical-and-mismatch.untouched.wat +++ b/tests/compiler/rc/logical-and-mismatch.untouched.wat @@ -89,7 +89,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -101,7 +101,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -475,7 +475,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -487,7 +487,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -800,7 +800,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -964,7 +964,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -994,7 +994,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1184,7 +1184,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 1990fceb4d..28dd6e3978 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -65,7 +65,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -76,7 +76,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -366,7 +366,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -377,7 +377,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -761,7 +761,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/rc/logical-or-mismatch.untouched.wat b/tests/compiler/rc/logical-or-mismatch.untouched.wat index 7b5643728a..16b203f1d7 100644 --- a/tests/compiler/rc/logical-or-mismatch.untouched.wat +++ b/tests/compiler/rc/logical-or-mismatch.untouched.wat @@ -89,7 +89,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -101,7 +101,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -475,7 +475,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -487,7 +487,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -800,7 +800,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -964,7 +964,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -994,7 +994,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1184,7 +1184,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 24514d4c6e..995319d8fa 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -155,7 +155,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -166,7 +166,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -456,7 +456,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -467,7 +467,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -851,7 +851,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/rc/optimize.untouched.wat b/tests/compiler/rc/optimize.untouched.wat index 976f64ba79..a7367ce91f 100644 --- a/tests/compiler/rc/optimize.untouched.wat +++ b/tests/compiler/rc/optimize.untouched.wat @@ -192,7 +192,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -204,7 +204,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -578,7 +578,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -590,7 +590,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -903,7 +903,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1067,7 +1067,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1097,7 +1097,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1287,7 +1287,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 9f867dcaa7..1082f8c402 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -68,7 +68,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -79,7 +79,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -369,7 +369,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -380,7 +380,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -672,7 +672,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -699,7 +699,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -951,7 +951,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 diff --git a/tests/compiler/rc/rereturn.untouched.wat b/tests/compiler/rc/rereturn.untouched.wat index 5500bca8b6..46ec808478 100644 --- a/tests/compiler/rc/rereturn.untouched.wat +++ b/tests/compiler/rc/rereturn.untouched.wat @@ -91,7 +91,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -103,7 +103,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -477,7 +477,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -489,7 +489,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -802,7 +802,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -966,7 +966,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -996,7 +996,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1186,7 +1186,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 7acd3d8ef2..e2dcc99097 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -67,7 +67,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -78,7 +78,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -368,7 +368,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -379,7 +379,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -763,7 +763,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/rc/ternary-mismatch.untouched.wat b/tests/compiler/rc/ternary-mismatch.untouched.wat index d0ecabd473..6dffb7d72d 100644 --- a/tests/compiler/rc/ternary-mismatch.untouched.wat +++ b/tests/compiler/rc/ternary-mismatch.untouched.wat @@ -91,7 +91,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -103,7 +103,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -477,7 +477,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -489,7 +489,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -802,7 +802,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -966,7 +966,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -996,7 +996,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1186,7 +1186,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index cf78b55571..502c3cd9f8 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -122,7 +122,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/reexport.untouched.wat b/tests/compiler/reexport.untouched.wat index 6db5c821e9..5c277543ef 100644 --- a/tests/compiler/reexport.untouched.wat +++ b/tests/compiler/reexport.untouched.wat @@ -128,7 +128,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index 7bc738b532..606338749d 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -68,7 +68,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $3 local.get $2 diff --git a/tests/compiler/rereexport.untouched.wat b/tests/compiler/rereexport.untouched.wat index dfda1a44ed..97762fb368 100644 --- a/tests/compiler/rereexport.untouched.wat +++ b/tests/compiler/rereexport.untouched.wat @@ -78,7 +78,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 8cea687c7b..49a4bab338 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -68,7 +68,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/resolve-access.untouched.wat b/tests/compiler/resolve-access.untouched.wat index 4b3fcc5835..9de1f9f8f9 100644 --- a/tests/compiler/resolve-access.untouched.wat +++ b/tests/compiler/resolve-access.untouched.wat @@ -61,7 +61,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -408,7 +408,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -424,7 +424,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -440,7 +440,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -456,7 +456,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -529,7 +529,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -545,7 +545,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -561,7 +561,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -577,7 +577,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -636,7 +636,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -652,7 +652,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -668,7 +668,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -684,7 +684,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -1885,7 +1885,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -2030,7 +2030,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -2184,7 +2184,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $4 @@ -2364,7 +2364,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $3 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 22d6babd96..81ca43caa9 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -59,7 +59,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -257,7 +257,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 @@ -330,7 +330,7 @@ if (result i32) local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $1 if i32.const 0 @@ -391,7 +391,7 @@ local.get $3 local.get $10 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -638,7 +638,7 @@ i64.mul local.tee $3 local.get $1 - i64.shr_s + i64.shr_u local.tee $7 local.get $6 i64.extend_i32_s @@ -1179,34 +1179,34 @@ global.get $~lib/util/number/_frc_pow local.tee $1 i64.const 32 - i64.shr_s + i64.shr_u local.set $3 local.get $1 i64.const 4294967295 i64.and local.tee $1 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl local.get $1 i64.const 10 i64.shl i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $2 local.get $0 local.get $0 local.get $3 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl local.get $1 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl i64.const 0 i64.add local.tee $4 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $4 i64.const 4294967295 @@ -1223,11 +1223,11 @@ i32.const 3 i32.add local.get $3 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl local.get $2 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $2 i64.const 4294967295 @@ -1239,7 +1239,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.sub @@ -1258,11 +1258,11 @@ i64.const 4294966784 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $3 i64.const 4294966784 @@ -1274,7 +1274,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.add @@ -1653,7 +1653,7 @@ end global.get $resolve-binary/a i32.const 1 - i32.shr_u + i32.shr_s global.set $resolve-binary/a global.get $resolve-binary/a call $~lib/number/I32#toString @@ -1670,7 +1670,7 @@ end global.get $resolve-binary/a i32.const 1 - i32.shr_s + i32.shr_u global.set $resolve-binary/a global.get $resolve-binary/a call $~lib/number/I32#toString @@ -1821,7 +1821,7 @@ local.set $2 local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -1893,7 +1893,7 @@ call $~lib/builtins/abort unreachable end - i32.const -1 + i32.const 3 call $~lib/number/I32#toString i32.const 2768 call $~lib/string/String.__eq diff --git a/tests/compiler/resolve-binary.untouched.wat b/tests/compiler/resolve-binary.untouched.wat index 627880f15f..586dfd71b8 100644 --- a/tests/compiler/resolve-binary.untouched.wat +++ b/tests/compiler/resolve-binary.untouched.wat @@ -95,7 +95,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -377,7 +377,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -630,7 +630,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -775,7 +775,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -855,7 +855,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $2 if @@ -905,7 +905,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -1086,11 +1086,11 @@ local.set $6 local.get $5 i64.const 52 - i64.shr_s + i64.shr_u local.set $7 local.get $6 i64.const 52 - i64.shr_s + i64.shr_u local.set $8 local.get $7 i64.const 1 @@ -1177,7 +1177,7 @@ i64.lt_u local.get $6 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.eqz @@ -1209,7 +1209,7 @@ local.set $10 local.get $5 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 if (result i32) block $~lib/util/math/checkint|inlined.0 (result i32) @@ -1217,7 +1217,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $11 @@ -1279,7 +1279,7 @@ end local.get $6 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne if (result f64) @@ -1293,7 +1293,7 @@ end local.get $5 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne if @@ -1302,7 +1302,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $11 @@ -1453,14 +1453,14 @@ i64.const 52 i64.const 7 i64.sub - i64.shr_s + i64.shr_u i64.const 127 i64.and i32.wrap_i64 local.set $12 local.get $11 i64.const 52 - i64.shr_u + i64.shr_s local.set $13 local.get $9 local.get $11 @@ -1679,7 +1679,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2047 i32.and @@ -1708,7 +1708,7 @@ if local.get $9 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne if (result f64) @@ -1992,7 +1992,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $11 local.get $3 @@ -2313,7 +2313,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u local.set $22 local.get $22 local.get $14 @@ -2714,7 +2714,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2730,7 +2730,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2746,7 +2746,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2762,7 +2762,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2835,7 +2835,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2851,7 +2851,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2867,7 +2867,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2883,7 +2883,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2942,7 +2942,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2958,7 +2958,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2974,7 +2974,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2990,7 +2990,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -4082,7 +4082,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $7 local.get $6 @@ -4181,7 +4181,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $14 @@ -4236,11 +4236,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -4251,7 +4251,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -4268,11 +4268,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $24 i64.const 32 - i64.shr_s + i64.shr_u local.set $24 local.get $20 local.get $21 @@ -4306,11 +4306,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $23 local.get $22 @@ -4321,7 +4321,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $18 local.get $23 @@ -4338,11 +4338,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_s + i64.shr_u local.set $18 local.get $25 i64.const 32 - i64.shr_s + i64.shr_u local.set $25 local.get $21 local.get $20 @@ -4378,11 +4378,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -4393,7 +4393,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -4410,11 +4410,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $27 i64.const 32 - i64.shr_s + i64.shr_u local.set $27 local.get $20 local.get $21 @@ -4779,7 +4779,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -4797,7 +4797,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -4815,7 +4815,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -4833,7 +4833,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -4872,7 +4872,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -5427,7 +5427,7 @@ end global.get $resolve-binary/a i32.const 1 - i32.shr_u + i32.shr_s global.set $resolve-binary/a global.get $resolve-binary/a i32.const 10 @@ -5446,7 +5446,7 @@ end global.get $resolve-binary/a i32.const 1 - i32.shr_s + i32.shr_u global.set $resolve-binary/a global.get $resolve-binary/a i32.const 10 @@ -5675,7 +5675,7 @@ end i32.const 2 i32.const 1 - i32.shr_u + i32.shr_s i32.const 10 call $~lib/number/I32#toString local.tee $30 @@ -5692,7 +5692,7 @@ end i32.const -1 i32.const 30 - i32.shr_s + i32.shr_u i32.const 10 call $~lib/number/I32#toString local.tee $31 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 31e3072fc7..b36e1a3f7a 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -94,7 +94,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 @@ -312,7 +312,7 @@ i32.const 2 i32.const 1073741808 local.get $1 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 1040 @@ -350,7 +350,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1152 @@ -374,7 +374,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1152 @@ -463,7 +463,7 @@ local.get $3 local.get $11 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -710,7 +710,7 @@ i64.mul local.tee $3 local.get $13 - i64.shr_s + i64.shr_u local.tee $1 local.get $6 i64.extend_i32_s @@ -1366,7 +1366,7 @@ f64.ne i32.add i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.tee $4 @@ -1394,12 +1394,12 @@ local.set $2 local.get $6 i64.const 32 - i64.shr_s + i64.shr_u local.tee $6 global.get $~lib/util/number/_frc_plus local.tee $5 i64.const 32 - i64.shr_s + i64.shr_u local.tee $7 i64.mul local.get $2 @@ -1412,11 +1412,11 @@ local.tee $5 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $5 local.get $6 @@ -1428,7 +1428,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.sub @@ -1449,7 +1449,7 @@ i64.shl local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u local.tee $7 i64.mul local.get $2 @@ -1462,11 +1462,11 @@ local.tee $3 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $3 local.get $6 @@ -1478,7 +1478,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add global.get $~lib/util/number/_exp_pow local.tee $4 @@ -1499,7 +1499,7 @@ global.get $~lib/util/number/_frc_minus local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u local.tee $5 i64.mul local.get $2 @@ -1512,11 +1512,11 @@ local.tee $2 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $2 local.get $6 @@ -1528,7 +1528,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.add @@ -1548,7 +1548,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/resolve-elementaccess.untouched.wat b/tests/compiler/resolve-elementaccess.untouched.wat index f125c7ce3b..cd750819a0 100644 --- a/tests/compiler/resolve-elementaccess.untouched.wat +++ b/tests/compiler/resolve-elementaccess.untouched.wat @@ -88,7 +88,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -413,7 +413,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -481,7 +481,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 144 @@ -505,7 +505,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 144 @@ -620,7 +620,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $11 local.get $3 @@ -941,7 +941,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u local.set $22 local.get $22 local.get $14 @@ -1342,7 +1342,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1358,7 +1358,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1374,7 +1374,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1390,7 +1390,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1463,7 +1463,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1479,7 +1479,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -1495,7 +1495,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1511,7 +1511,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -1570,7 +1570,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -1586,7 +1586,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -1602,7 +1602,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -1618,7 +1618,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2850,7 +2850,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $7 local.get $6 @@ -2949,7 +2949,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $14 @@ -3004,11 +3004,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -3019,7 +3019,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -3036,11 +3036,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $24 i64.const 32 - i64.shr_s + i64.shr_u local.set $24 local.get $20 local.get $21 @@ -3074,11 +3074,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $23 local.get $22 @@ -3089,7 +3089,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $18 local.get $23 @@ -3106,11 +3106,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_s + i64.shr_u local.set $18 local.get $25 i64.const 32 - i64.shr_s + i64.shr_u local.set $25 local.get $21 local.get $20 @@ -3146,11 +3146,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -3161,7 +3161,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -3178,11 +3178,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $27 i64.const 32 - i64.shr_s + i64.shr_u local.set $27 local.get $20 local.get $21 @@ -3228,7 +3228,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -3756,7 +3756,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -3901,7 +3901,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -4017,7 +4017,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $3 diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 5f5b1944b5..ee3dd5a1bf 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -80,7 +80,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 @@ -132,7 +132,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $2 if i32.const 0 @@ -223,7 +223,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/resolve-function-expression.untouched.wat b/tests/compiler/resolve-function-expression.untouched.wat index e2464dddd4..7384bbdc18 100644 --- a/tests/compiler/resolve-function-expression.untouched.wat +++ b/tests/compiler/resolve-function-expression.untouched.wat @@ -127,7 +127,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -380,7 +380,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -525,7 +525,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -608,7 +608,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $2 if @@ -658,7 +658,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -732,7 +732,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index c39e8a281f..e220e7e288 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -45,7 +45,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/resolve-nested.untouched.wat b/tests/compiler/resolve-nested.untouched.wat index 2e50472f19..c7af958501 100644 --- a/tests/compiler/resolve-nested.untouched.wat +++ b/tests/compiler/resolve-nested.untouched.wat @@ -62,7 +62,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index 60af963fad..b06a5f2b6d 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -32,7 +32,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $1 local.get $2 local.get $1 diff --git a/tests/compiler/resolve-new.untouched.wat b/tests/compiler/resolve-new.untouched.wat index dcb7b5f8cb..61f82a9dd5 100644 --- a/tests/compiler/resolve-new.untouched.wat +++ b/tests/compiler/resolve-new.untouched.wat @@ -37,7 +37,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 7e22a87a4f..07f6d62705 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -72,7 +72,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 @@ -124,7 +124,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $2 if i32.const 0 @@ -216,7 +216,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/resolve-propertyaccess.untouched.wat b/tests/compiler/resolve-propertyaccess.untouched.wat index f6be08e382..857ac723a0 100644 --- a/tests/compiler/resolve-propertyaccess.untouched.wat +++ b/tests/compiler/resolve-propertyaccess.untouched.wat @@ -128,7 +128,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -381,7 +381,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -526,7 +526,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -609,7 +609,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $2 if @@ -659,7 +659,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -733,7 +733,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 8a022150d8..86bb1d91ff 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -94,7 +94,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -105,7 +105,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -395,7 +395,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -406,7 +406,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -698,7 +698,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -725,7 +725,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -977,7 +977,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1195,7 +1195,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1366,7 +1366,7 @@ local.get $3 local.get $10 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -1613,7 +1613,7 @@ i64.mul local.tee $3 local.get $1 - i64.shr_s + i64.shr_u local.tee $7 local.get $6 i64.extend_i32_s @@ -2155,34 +2155,34 @@ global.get $~lib/util/number/_frc_pow local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u local.set $3 local.get $2 i64.const 4294967295 i64.and local.tee $2 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl local.get $2 i64.const 10 i64.shl i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $1 local.get $0 local.get $0 local.get $3 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl local.get $2 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl i64.const 0 i64.add local.tee $5 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $5 i64.const 4294967295 @@ -2199,11 +2199,11 @@ i32.const 1 i32.add local.get $3 - i64.const -2147483648 - i64.mul + i64.const 31 + i64.shl local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $1 i64.const 4294967295 @@ -2215,7 +2215,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.sub @@ -2234,11 +2234,11 @@ i64.const 4294966784 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $1 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $3 i64.const 4294966784 @@ -2250,7 +2250,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.add diff --git a/tests/compiler/resolve-ternary.untouched.wat b/tests/compiler/resolve-ternary.untouched.wat index 51e78680ee..6ad2258385 100644 --- a/tests/compiler/resolve-ternary.untouched.wat +++ b/tests/compiler/resolve-ternary.untouched.wat @@ -132,7 +132,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -144,7 +144,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -518,7 +518,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -530,7 +530,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -843,7 +843,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1007,7 +1007,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1037,7 +1037,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1227,7 +1227,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1794,7 +1794,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -1939,7 +1939,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -2019,7 +2019,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $2 if @@ -2069,7 +2069,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -2140,7 +2140,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -2383,7 +2383,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $11 local.get $3 @@ -2704,7 +2704,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u local.set $22 local.get $22 local.get $14 @@ -3105,7 +3105,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -3121,7 +3121,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -3137,7 +3137,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -3153,7 +3153,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -3226,7 +3226,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -3242,7 +3242,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -3258,7 +3258,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -3274,7 +3274,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -3333,7 +3333,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -3349,7 +3349,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -3365,7 +3365,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -3381,7 +3381,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -4473,7 +4473,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $7 local.get $6 @@ -4572,7 +4572,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $14 @@ -4627,11 +4627,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -4642,7 +4642,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -4659,11 +4659,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $24 i64.const 32 - i64.shr_s + i64.shr_u local.set $24 local.get $20 local.get $21 @@ -4697,11 +4697,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $23 local.get $22 @@ -4712,7 +4712,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $18 local.get $23 @@ -4729,11 +4729,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_s + i64.shr_u local.set $18 local.get $25 i64.const 32 - i64.shr_s + i64.shr_u local.set $25 local.get $21 local.get $20 @@ -4769,11 +4769,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -4784,7 +4784,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -4801,11 +4801,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $27 i64.const 32 - i64.shr_s + i64.shr_u local.set $27 local.get $20 local.get $21 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index bd57e1a396..1a6b1e62cd 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -77,7 +77,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 @@ -129,7 +129,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $2 if i32.const 0 @@ -221,7 +221,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/resolve-unary.untouched.wat b/tests/compiler/resolve-unary.untouched.wat index 4399644069..43466944f9 100644 --- a/tests/compiler/resolve-unary.untouched.wat +++ b/tests/compiler/resolve-unary.untouched.wat @@ -124,7 +124,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -377,7 +377,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -522,7 +522,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -605,7 +605,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $2 if @@ -655,7 +655,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -729,7 +729,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/retain-i32.optimized.wat b/tests/compiler/retain-i32.optimized.wat index 22d7a94dc8..99faa43113 100644 --- a/tests/compiler/retain-i32.optimized.wat +++ b/tests/compiler/retain-i32.optimized.wat @@ -1,7 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\1a\00\00\00\01\00\00\00\01\00\00\00\1a\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") (export "memory" (memory $0)) @@ -23,10 +21,10 @@ end end i32.const 0 - i32.const 1040 - i32.const 78 - i32.const 1 - call $~lib/builtins/abort - unreachable + i32.load8_s + drop + i32.const 0 + i32.load8_s + drop ) ) diff --git a/tests/compiler/retain-i32.untouched.wat b/tests/compiler/retain-i32.untouched.wat index b500a0ae0d..a096fb55d4 100644 --- a/tests/compiler/retain-i32.untouched.wat +++ b/tests/compiler/retain-i32.untouched.wat @@ -27,14 +27,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.get $0 local.get $1 i32.add i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -51,14 +51,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.get $0 local.get $1 i32.sub i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -75,14 +75,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.get $0 local.get $1 i32.mul i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -99,14 +99,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.get $0 local.get $1 i32.and i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -123,14 +123,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.get $0 local.get $1 i32.or i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -147,14 +147,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.get $0 local.get $1 i32.xor i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -171,14 +171,14 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.get $0 local.get $1 i32.shl i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -470,7 +470,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s global.set $retain-i32/si global.get $retain-i32/si i32.const -1 @@ -492,7 +492,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s global.set $retain-i32/si global.get $retain-i32/si i32.const -1 @@ -512,7 +512,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s global.set $retain-i32/si global.get $retain-i32/si i32.const -2 @@ -532,7 +532,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s global.set $retain-i32/si global.get $retain-i32/si i32.const -128 @@ -552,7 +552,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s global.set $retain-i32/si global.get $retain-i32/si i32.const -128 @@ -572,7 +572,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s global.set $retain-i32/si global.get $retain-i32/si i32.const -127 @@ -592,7 +592,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s global.set $retain-i32/si global.get $retain-i32/si i32.const -128 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index e210954154..686f1bd9d3 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -92,7 +92,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -103,7 +103,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -393,7 +393,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -404,7 +404,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -720,7 +720,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -747,7 +747,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -980,7 +980,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1614,7 +1614,7 @@ i32.load offset=8 local.tee $2 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 @@ -1693,7 +1693,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/retain-release-sanity.untouched.wat b/tests/compiler/retain-release-sanity.untouched.wat index 6061dafd27..917fefc811 100644 --- a/tests/compiler/retain-release-sanity.untouched.wat +++ b/tests/compiler/retain-release-sanity.untouched.wat @@ -116,7 +116,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -128,7 +128,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -502,7 +502,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -514,7 +514,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -827,7 +827,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -991,7 +991,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1021,7 +1021,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1211,7 +1211,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1789,7 +1789,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -2151,7 +2151,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2167,7 +2167,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2183,7 +2183,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2199,7 +2199,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2272,7 +2272,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2288,7 +2288,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2304,7 +2304,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2320,7 +2320,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2379,7 +2379,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2395,7 +2395,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2411,7 +2411,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2427,7 +2427,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -3301,13 +3301,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -3444,7 +3444,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -3524,7 +3524,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -3618,7 +3618,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index 511893aa2d..d5e575aef0 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -99,7 +99,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/retain-release.untouched.wat b/tests/compiler/retain-release.untouched.wat index 2ad146c342..aa25a055a3 100644 --- a/tests/compiler/retain-release.untouched.wat +++ b/tests/compiler/retain-release.untouched.wat @@ -83,7 +83,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 6c293547cc..2265222389 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -70,7 +70,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -81,7 +81,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -371,7 +371,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -382,7 +382,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -766,7 +766,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/retain-return.untouched.wat b/tests/compiler/retain-return.untouched.wat index 8d68badab9..60f06964d6 100644 --- a/tests/compiler/retain-return.untouched.wat +++ b/tests/compiler/retain-return.untouched.wat @@ -100,7 +100,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -112,7 +112,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -486,7 +486,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -498,7 +498,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -811,7 +811,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -975,7 +975,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1005,7 +1005,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1195,7 +1195,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/rt/finalize.optimized.wat b/tests/compiler/rt/finalize.optimized.wat index a9ec6c9b08..cad0f1fc39 100644 --- a/tests/compiler/rt/finalize.optimized.wat +++ b/tests/compiler/rt/finalize.optimized.wat @@ -90,7 +90,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -101,7 +101,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -391,7 +391,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -402,7 +402,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -694,7 +694,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -721,7 +721,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -974,7 +974,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1270,7 +1270,7 @@ i32.sub i32.load offset=12 i32.const 2 - i32.shr_s + i32.shr_u ) (func $rt/finalize/expect (param $0 i32) (local $1 i32) diff --git a/tests/compiler/rt/finalize.untouched.wat b/tests/compiler/rt/finalize.untouched.wat index 562fc689bb..5819deea71 100644 --- a/tests/compiler/rt/finalize.untouched.wat +++ b/tests/compiler/rt/finalize.untouched.wat @@ -114,7 +114,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -126,7 +126,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -500,7 +500,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -512,7 +512,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -825,7 +825,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -989,7 +989,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1019,7 +1019,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1209,7 +1209,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1760,7 +1760,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -1819,7 +1819,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -1875,7 +1875,7 @@ i32.sub i32.load offset=12 i32.const 2 - i32.shr_s + i32.shr_u ) (func $~lib/staticarray/StaticArray#__uset (param $0 i32) (param $1 i32) (param $2 i32) i32.const 0 @@ -2494,7 +2494,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2510,7 +2510,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2526,7 +2526,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2542,7 +2542,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2615,7 +2615,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2631,7 +2631,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2647,7 +2647,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2663,7 +2663,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2722,7 +2722,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2738,7 +2738,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2754,7 +2754,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2770,7 +2770,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 4dd57c2598..d433725220 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -45,7 +45,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/rt/instanceof.untouched.wat b/tests/compiler/rt/instanceof.untouched.wat index d848eefaf7..a1cb7ea6d1 100644 --- a/tests/compiler/rt/instanceof.untouched.wat +++ b/tests/compiler/rt/instanceof.untouched.wat @@ -51,7 +51,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index 3e7bd7bd74..f8dd972f4e 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -45,7 +45,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $1 local.get $2 local.get $1 diff --git a/tests/compiler/rt/stub-realloc.untouched.wat b/tests/compiler/rt/stub-realloc.untouched.wat index 9ef62b990b..081fb46313 100644 --- a/tests/compiler/rt/stub-realloc.untouched.wat +++ b/tests/compiler/rt/stub-realloc.untouched.wat @@ -54,7 +54,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -414,7 +414,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -430,7 +430,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -446,7 +446,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -462,7 +462,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -535,7 +535,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -551,7 +551,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -567,7 +567,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -583,7 +583,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -642,7 +642,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -658,7 +658,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -674,7 +674,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -690,7 +690,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 5a4b38da39..b1cfbd7047 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -68,7 +68,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -79,7 +79,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -369,7 +369,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -380,7 +380,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -672,7 +672,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -699,7 +699,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -951,7 +951,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 diff --git a/tests/compiler/runtime-full.untouched.wat b/tests/compiler/runtime-full.untouched.wat index bf8e9d96ef..982cc205cd 100644 --- a/tests/compiler/runtime-full.untouched.wat +++ b/tests/compiler/runtime-full.untouched.wat @@ -90,7 +90,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -102,7 +102,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -476,7 +476,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -488,7 +488,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -801,7 +801,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -965,7 +965,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -995,7 +995,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1185,7 +1185,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index c72a6fe9eb..6825547dd7 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -62,7 +62,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 diff --git a/tests/compiler/runtime-stub.untouched.wat b/tests/compiler/runtime-stub.untouched.wat index 21cb2052ba..6fb4fec6af 100644 --- a/tests/compiler/runtime-stub.untouched.wat +++ b/tests/compiler/runtime-stub.untouched.wat @@ -44,7 +44,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 6619448d18..8c4643e1d0 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -74,7 +74,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $std/array-access/stringArrayPropertyAccess (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 7599507c93..5a71f70c10 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -172,7 +172,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $std/array-access/stringArrayPropertyAccess (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index b8e54a36b0..0360098a44 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -120,7 +120,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -131,7 +131,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -421,7 +421,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -432,7 +432,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -724,7 +724,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -751,7 +751,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -1003,7 +1003,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 63372462eb..3e64393f57 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -177,7 +177,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -189,7 +189,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -563,7 +563,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -575,7 +575,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -888,7 +888,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1052,7 +1052,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1082,7 +1082,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1272,7 +1272,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1806,7 +1806,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1822,7 +1822,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1838,7 +1838,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1854,7 +1854,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1927,7 +1927,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1943,7 +1943,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -1959,7 +1959,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1975,7 +1975,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2034,7 +2034,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2050,7 +2050,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2066,7 +2066,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2082,7 +2082,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 67ccd87295..feee7718d4 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -451,7 +451,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -462,7 +462,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -752,7 +752,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -763,7 +763,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -1079,7 +1079,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -1106,7 +1106,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -1338,7 +1338,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -2265,7 +2265,7 @@ i32.sub i32.load offset=12 i32.const 2 - i32.shr_u + i32.shr_s local.get $0 call $~lib/rt/pure/__release local.get $1 @@ -2437,13 +2437,13 @@ i32.load offset=8 local.tee $3 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 1040 @@ -4144,21 +4144,21 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor i64.const -49064778989728563 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor i64.const -4265267296055464877 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor ) (func $~lib/math/splitMix32 (param $0 i32) (result i32) @@ -4168,7 +4168,7 @@ local.tee $0 local.get $0 i32.const 15 - i32.shr_s + i32.shr_u i32.xor local.get $0 i32.const 1 @@ -4182,7 +4182,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_s + i32.shr_u i32.xor i32.mul i32.add @@ -4190,7 +4190,7 @@ local.tee $0 local.get $0 i32.const 14 - i32.shr_s + i32.shr_u i32.xor ) (func $~lib/math/NativeMath.seedRandom (param $0 i64) @@ -4336,7 +4336,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.tee $2 @@ -4364,24 +4364,24 @@ local.get $5 local.get $2 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $2 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq if local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.set $2 br $while-continue|1 end @@ -4389,7 +4389,7 @@ local.get $0 local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 2 i32.shl @@ -4416,7 +4416,7 @@ local.get $5 local.get $3 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -4482,7 +4482,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -4490,7 +4490,7 @@ local.get $1 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and local.get $1 @@ -4534,7 +4534,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -4561,7 +4561,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 br $while-continue|4 end @@ -4677,7 +4677,7 @@ local.tee $2 local.get $2 i32.const 31 - i32.shr_u + i32.shr_s i32.const 1 i32.shr_u i32.xor @@ -4687,7 +4687,7 @@ local.tee $3 local.get $3 i32.const 31 - i32.shr_u + i32.shr_s i32.const 1 i32.shr_u i32.xor @@ -4874,7 +4874,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.tee $2 @@ -4902,24 +4902,24 @@ local.get $5 local.get $2 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $2 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq if local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.set $2 br $while-continue|1 end @@ -4927,7 +4927,7 @@ local.get $0 local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 3 i32.shl @@ -4954,7 +4954,7 @@ local.get $5 local.get $3 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -5020,7 +5020,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -5028,7 +5028,7 @@ local.get $1 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and local.get $1 @@ -5072,7 +5072,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -5099,7 +5099,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 br $while-continue|4 end @@ -5215,7 +5215,7 @@ local.tee $2 local.get $2 i64.const 63 - i64.shr_u + i64.shr_s i64.const 1 i64.shr_u i64.xor @@ -5225,7 +5225,7 @@ local.tee $3 local.get $3 i64.const 63 - i64.shr_u + i64.shr_s i64.const 1 i64.shr_u i64.xor @@ -5433,7 +5433,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.tee $2 @@ -5461,24 +5461,24 @@ local.get $4 local.get $2 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $2 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq if local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.set $2 br $while-continue|1 end @@ -5486,7 +5486,7 @@ local.get $0 local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.tee $7 i32.const 2 i32.shl @@ -5513,7 +5513,7 @@ local.get $4 local.get $3 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -5579,7 +5579,7 @@ local.get $4 local.get $1 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -5587,7 +5587,7 @@ local.get $1 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and local.get $1 @@ -5631,7 +5631,7 @@ local.get $4 local.get $1 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -5658,7 +5658,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 br $while-continue|4 end @@ -5851,17 +5851,17 @@ local.tee $0 local.get $0 i64.const 17 - i64.shr_s + i64.shr_u i64.xor i64.xor local.get $1 i64.const 26 - i64.shr_s + i64.shr_u i64.xor global.set $~lib/math/random_state1_64 local.get $1 i64.const 12 - i64.shr_s + i64.shr_u i64.const 4607182418800017408 i64.or f64.reinterpret_i64 @@ -6529,7 +6529,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -7290,7 +7290,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $1 if i32.const 0 @@ -7706,7 +7706,7 @@ local.get $3 local.get $11 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -7953,7 +7953,7 @@ i64.mul local.tee $3 local.get $13 - i64.shr_s + i64.shr_u local.tee $1 local.get $6 i64.extend_i32_s @@ -8409,7 +8409,7 @@ f64.ne i32.add i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.tee $4 @@ -8437,12 +8437,12 @@ local.set $2 local.get $6 i64.const 32 - i64.shr_s + i64.shr_u local.tee $6 global.get $~lib/util/number/_frc_plus local.tee $5 i64.const 32 - i64.shr_s + i64.shr_u local.tee $7 i64.mul local.get $2 @@ -8455,11 +8455,11 @@ local.tee $5 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $5 local.get $6 @@ -8471,7 +8471,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.sub @@ -8492,7 +8492,7 @@ i64.shl local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u local.tee $7 i64.mul local.get $2 @@ -8505,11 +8505,11 @@ local.tee $3 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $3 local.get $6 @@ -8521,7 +8521,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add global.get $~lib/util/number/_exp_pow local.tee $4 @@ -8542,7 +8542,7 @@ global.get $~lib/util/number/_frc_minus local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u local.tee $5 i64.mul local.get $2 @@ -8555,11 +8555,11 @@ local.tee $2 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $2 local.get $6 @@ -8571,7 +8571,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.add @@ -9201,9 +9201,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 0 - i32.lt_u + i32.lt_s local.tee $2 if local.get $0 @@ -9218,7 +9218,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 10 i32.lt_u if @@ -9231,7 +9231,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 48 i32.or i32.store16 @@ -9245,7 +9245,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.tee $2 call $~lib/util/number/decimalCount32 i32.add @@ -9903,7 +9903,7 @@ drop local.get $3 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $0 if @@ -18653,7 +18653,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.tee $2 @@ -18681,24 +18681,24 @@ local.get $4 local.get $2 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $2 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq if local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.set $2 br $while-continue|1 end @@ -18706,7 +18706,7 @@ local.get $0 local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.tee $7 i32.add i32.load8_u @@ -18729,7 +18729,7 @@ local.get $4 local.get $3 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -18789,7 +18789,7 @@ local.get $4 local.get $1 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -18797,7 +18797,7 @@ local.get $1 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and local.get $1 @@ -18839,7 +18839,7 @@ local.get $4 local.get $1 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -18864,7 +18864,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 br $while-continue|4 end diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 497195fe6f..347bea9cff 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -479,7 +479,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -491,7 +491,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -865,7 +865,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -877,7 +877,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1190,7 +1190,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1354,7 +1354,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1384,7 +1384,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1574,7 +1574,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -2152,7 +2152,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -2279,7 +2279,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -2663,7 +2663,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2679,7 +2679,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2695,7 +2695,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2711,7 +2711,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2784,7 +2784,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2800,7 +2800,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2816,7 +2816,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2832,7 +2832,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2891,7 +2891,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2907,7 +2907,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2923,7 +2923,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2939,7 +2939,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -4140,7 +4140,7 @@ local.get $1 call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 2 - i32.shr_u + i32.shr_s local.set $2 local.get $0 call $~lib/rt/pure/__release @@ -4357,13 +4357,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -4588,7 +4588,7 @@ local.get $4 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -7306,7 +7306,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -7316,7 +7316,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -7326,7 +7326,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -7339,7 +7339,7 @@ local.get $0 local.get $0 i32.const 15 - i32.shr_s + i32.shr_u i32.xor local.get $0 i32.const 1 @@ -7351,7 +7351,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_s + i32.shr_u i32.xor local.get $0 i32.const 61 @@ -7363,7 +7363,7 @@ local.get $0 local.get $0 i32.const 14 - i32.shr_s + i32.shr_u i32.xor ) (func $~lib/math/NativeMath.seedRandom (param $0 i64) @@ -7538,7 +7538,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.set $3 @@ -7570,17 +7570,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq @@ -7589,14 +7589,14 @@ if local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 local.get $0 local.get $8 @@ -7625,14 +7625,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -7704,7 +7704,7 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -7712,7 +7712,7 @@ local.get $8 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.add @@ -7757,14 +7757,14 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $8 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -7789,7 +7789,7 @@ end local.get $8 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 br $while-continue|4 end @@ -7924,17 +7924,17 @@ local.get $2 local.get $2 i32.const 31 - i32.shr_u - i32.const 1 i32.shr_s + i32.const 1 + i32.shr_u i32.xor local.set $2 local.get $3 local.get $3 i32.const 31 - i32.shr_u - i32.const 1 i32.shr_s + i32.const 1 + i32.shr_u i32.xor local.set $3 local.get $2 @@ -8203,7 +8203,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.set $3 @@ -8235,17 +8235,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq @@ -8254,14 +8254,14 @@ if local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 local.get $0 local.get $8 @@ -8290,14 +8290,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -8369,7 +8369,7 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -8377,7 +8377,7 @@ local.get $8 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.add @@ -8422,14 +8422,14 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $8 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -8454,7 +8454,7 @@ end local.get $8 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 br $while-continue|4 end @@ -8589,17 +8589,17 @@ local.get $2 local.get $2 i64.const 63 - i64.shr_u - i64.const 1 i64.shr_s + i64.const 1 + i64.shr_u i64.xor local.set $2 local.get $3 local.get $3 i64.const 63 - i64.shr_u - i64.const 1 i64.shr_s + i64.const 1 + i64.shr_u i64.xor local.set $3 local.get $2 @@ -8903,7 +8903,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.set $3 @@ -8935,17 +8935,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq @@ -8954,14 +8954,14 @@ if local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 local.get $0 local.get $8 @@ -8990,14 +8990,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -9069,7 +9069,7 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -9077,7 +9077,7 @@ local.get $9 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.add @@ -9122,14 +9122,14 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $9 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -9154,7 +9154,7 @@ end local.get $9 i32.const 1 - i32.shr_u + i32.shr_s local.set $9 br $while-continue|4 end @@ -9432,7 +9432,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.set $3 @@ -9464,17 +9464,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq @@ -9483,14 +9483,14 @@ if local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 local.get $0 local.get $8 @@ -9519,14 +9519,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -9598,7 +9598,7 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -9606,7 +9606,7 @@ local.get $9 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.add @@ -9651,14 +9651,14 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $9 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -9683,7 +9683,7 @@ end local.get $9 i32.const 1 - i32.shr_u + i32.shr_s local.set $9 br $while-continue|4 end @@ -9911,7 +9911,7 @@ local.get $0 local.get $0 i64.const 17 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -9921,14 +9921,14 @@ local.get $0 local.get $1 i64.const 26 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 global.set $~lib/math/random_state1_64 local.get $1 i64.const 12 - i64.shr_s + i64.shr_u i64.const 4607182418800017408 i64.or local.set $2 @@ -10148,7 +10148,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -10714,7 +10714,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -11602,7 +11602,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -12089,7 +12089,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -13452,7 +13452,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -13597,7 +13597,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -13677,7 +13677,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $2 if @@ -13727,7 +13727,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -14121,7 +14121,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $3 @@ -14452,7 +14452,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $11 local.get $3 @@ -14773,7 +14773,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u local.set $22 local.get $22 local.get $14 @@ -15289,7 +15289,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $7 local.get $6 @@ -15388,7 +15388,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $14 @@ -15443,11 +15443,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -15458,7 +15458,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -15475,11 +15475,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $24 i64.const 32 - i64.shr_s + i64.shr_u local.set $24 local.get $20 local.get $21 @@ -15513,11 +15513,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $23 local.get $22 @@ -15528,7 +15528,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $18 local.get $23 @@ -15545,11 +15545,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_s + i64.shr_u local.set $18 local.get $25 i64.const 32 - i64.shr_s + i64.shr_u local.set $25 local.get $21 local.get $20 @@ -15585,11 +15585,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -15600,7 +15600,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -15617,11 +15617,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $27 i64.const 32 - i64.shr_s + i64.shr_u local.set $27 local.get $20 local.get $21 @@ -16754,7 +16754,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 0 i32.lt_s local.set $2 @@ -16782,7 +16782,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 10 i32.lt_u if @@ -16795,7 +16795,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 48 i32.or i32.store16 @@ -16815,7 +16815,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/number/decimalCount32 i32.add local.set $3 @@ -16825,7 +16825,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.set $4 @@ -17573,7 +17573,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $4 @@ -17932,7 +17932,7 @@ end local.get $0 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 local.get $2 @@ -18019,7 +18019,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -26115,7 +26115,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -26621,7 +26621,7 @@ local.get $4 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -27413,7 +27413,7 @@ local.get $1 i32.const 1073741808 i32.const 0 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -27923,7 +27923,7 @@ local.get $4 i32.const 1073741808 i32.const 0 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -28780,7 +28780,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.set $3 @@ -28812,17 +28812,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq @@ -28831,14 +28831,14 @@ if local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 local.get $0 local.get $8 @@ -28867,14 +28867,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -28946,7 +28946,7 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -28954,7 +28954,7 @@ local.get $9 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.add @@ -28999,14 +28999,14 @@ local.get $4 local.get $9 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $9 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -29031,7 +29031,7 @@ end local.get $9 i32.const 1 - i32.shr_u + i32.shr_s local.set $9 br $while-continue|4 end @@ -29782,7 +29782,7 @@ local.get $4 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index c479984cb9..74e1c922e2 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -82,7 +82,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -93,7 +93,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -383,7 +383,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -394,7 +394,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -686,7 +686,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -713,7 +713,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -965,7 +965,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1527,7 +1527,7 @@ i32.const 1 i32.const 1073741808 local.get $1 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 1040 diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 5b1771ef94..36a60407d6 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -107,7 +107,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -119,7 +119,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -493,7 +493,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -505,7 +505,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -818,7 +818,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -982,7 +982,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1012,7 +1012,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1202,7 +1202,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -2049,7 +2049,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2065,7 +2065,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2081,7 +2081,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2097,7 +2097,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2170,7 +2170,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2186,7 +2186,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2202,7 +2202,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2218,7 +2218,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2277,7 +2277,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2293,7 +2293,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2309,7 +2309,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2325,7 +2325,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -3339,7 +3339,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 66509cceec..f710a3aca4 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -90,7 +90,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -101,7 +101,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -391,7 +391,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -402,7 +402,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -694,7 +694,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -721,7 +721,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -973,7 +973,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1295,7 +1295,7 @@ (func $~lib/dataview/DataView#getFloat32 (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 4 i32.add @@ -1331,7 +1331,7 @@ (func $~lib/polyfills/bswap (param $0 i64) (result i64) local.get $0 i64.const 8 - i64.shr_s + i64.shr_u i64.const 71777214294589695 i64.and local.get $0 @@ -1342,7 +1342,7 @@ i64.or local.tee $0 i64.const 16 - i64.shr_s + i64.shr_u i64.const 281470681808895 i64.and local.get $0 @@ -1400,20 +1400,22 @@ i32.load8_s ) (func $~lib/polyfills/bswap (param $0 i32) (result i32) - local.get $0 - i32.const 8 - i32.shl local.get $0 i32.const 16 i32.shl i32.const 24 - i32.shr_u + i32.shr_s + i32.const 255 + i32.and + local.get $0 + i32.const 8 + i32.shl i32.or ) (func $~lib/dataview/DataView#getInt16 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 2 i32.add @@ -1446,7 +1448,7 @@ (func $~lib/dataview/DataView#getInt32 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 4 i32.add @@ -1535,7 +1537,7 @@ (func $~lib/dataview/DataView#getUint16 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 2 i32.add @@ -1568,7 +1570,7 @@ (func $~lib/dataview/DataView#getUint32 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 4 i32.add @@ -2147,11 +2149,9 @@ i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u - i32.const -7946 + i32.const 65535 + i32.and + i32.const 57590 i32.ne if i32.const 0 @@ -2165,10 +2165,8 @@ i32.const 1 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 22752 i32.ne if @@ -2183,11 +2181,9 @@ i32.const 2 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u - i32.const -24744 + i32.const 65535 + i32.and + i32.const 40792 i32.ne if i32.const 0 @@ -2201,11 +2197,9 @@ i32.const 3 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u - i32.const -32097 + i32.const 65535 + i32.and + i32.const 33439 i32.ne if i32.const 0 @@ -2219,10 +2213,8 @@ i32.const 4 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 25986 i32.ne if @@ -2237,10 +2229,8 @@ i32.const 5 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 17253 i32.ne if @@ -2255,10 +2245,8 @@ i32.const 6 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 24387 i32.ne if @@ -2273,11 +2261,9 @@ i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u - i32.const -2336 + i32.const 65535 + i32.and + i32.const 63200 i32.ne if i32.const 0 @@ -2291,11 +2277,9 @@ i32.const 1 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u - i32.const -8104 + i32.const 65535 + i32.and + i32.const 57432 i32.ne if i32.const 0 @@ -2309,10 +2293,8 @@ i32.const 2 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 22687 i32.ne if @@ -2327,11 +2309,9 @@ i32.const 3 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u - i32.const -24702 + i32.const 65535 + i32.and + i32.const 40834 i32.ne if i32.const 0 @@ -2345,11 +2325,9 @@ i32.const 4 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u - i32.const -32155 + i32.const 65535 + i32.and + i32.const 33381 i32.ne if i32.const 0 @@ -2363,10 +2341,8 @@ i32.const 5 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 25923 i32.ne if @@ -2381,10 +2357,8 @@ i32.const 6 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 17247 i32.ne if @@ -3162,11 +3136,9 @@ i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u - i32.const -13360 + i32.const 65535 + i32.and + i32.const 52176 i32.ne if i32.const 0 @@ -3184,10 +3156,8 @@ i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 14689 i32.ne if diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index e5ebb22bd4..d0b78e568f 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -115,7 +115,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -127,7 +127,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -501,7 +501,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -513,7 +513,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -826,7 +826,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -990,7 +990,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1020,7 +1020,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1210,7 +1210,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1784,7 +1784,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -1982,7 +1982,7 @@ (func $~lib/dataview/DataView#getFloat32 (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 4 i32.add @@ -2035,7 +2035,7 @@ drop local.get $0 i64.const 8 - i64.shr_s + i64.shr_u i64.const 71777214294589695 i64.and local.set $1 @@ -2051,7 +2051,7 @@ local.set $3 local.get $3 i64.const 16 - i64.shr_s + i64.shr_u i64.const 281470681808895 i64.and local.set $1 @@ -2071,7 +2071,7 @@ (func $~lib/dataview/DataView#getFloat64 (param $0 i32) (param $1 i32) (param $2 i32) (result f64) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 8 i32.add @@ -2137,9 +2137,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.or @@ -2149,7 +2149,7 @@ (local $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 2 i32.add @@ -2207,7 +2207,7 @@ (local $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 4 i32.add @@ -2257,7 +2257,7 @@ drop local.get $0 i64.const 8 - i64.shr_s + i64.shr_u i64.const 71777214294589695 i64.and local.set $1 @@ -2273,7 +2273,7 @@ local.set $3 local.get $3 i64.const 16 - i64.shr_s + i64.shr_u i64.const 281470681808895 i64.and local.set $1 @@ -2294,7 +2294,7 @@ (local $3 i64) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 8 i32.add @@ -2357,7 +2357,7 @@ i32.const 65535 i32.and i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.or @@ -2367,7 +2367,7 @@ (local $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 2 i32.add @@ -2401,7 +2401,7 @@ (local $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 4 i32.add @@ -2435,7 +2435,7 @@ (local $3 i64) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 8 i32.add @@ -2468,7 +2468,7 @@ (func $~lib/dataview/DataView#setFloat32 (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 4 i32.add @@ -2506,7 +2506,7 @@ (func $~lib/dataview/DataView#setFloat64 (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 8 i32.add @@ -2564,7 +2564,7 @@ (func $~lib/dataview/DataView#setInt16 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 2 i32.add @@ -2596,7 +2596,7 @@ (func $~lib/dataview/DataView#setInt32 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 4 i32.add @@ -2628,7 +2628,7 @@ (func $~lib/dataview/DataView#setInt64 (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 8 i32.add @@ -2680,7 +2680,7 @@ (func $~lib/dataview/DataView#setUint16 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 2 i32.add @@ -2712,7 +2712,7 @@ (func $~lib/dataview/DataView#setUint32 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 4 i32.add @@ -2744,7 +2744,7 @@ (func $~lib/dataview/DataView#setUint64 (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 8 i32.add @@ -3153,7 +3153,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -7946 i32.eq i32.eqz @@ -3172,7 +3172,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 22752 i32.eq i32.eqz @@ -3191,7 +3191,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -24744 i32.eq i32.eqz @@ -3210,7 +3210,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -32097 i32.eq i32.eqz @@ -3229,7 +3229,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 25986 i32.eq i32.eqz @@ -3248,7 +3248,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 17253 i32.eq i32.eqz @@ -3267,7 +3267,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 24387 i32.eq i32.eqz @@ -3286,7 +3286,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -2336 i32.eq i32.eqz @@ -3305,7 +3305,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -8104 i32.eq i32.eqz @@ -3324,7 +3324,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 22687 i32.eq i32.eqz @@ -3343,7 +3343,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -24702 i32.eq i32.eqz @@ -3362,7 +3362,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -32155 i32.eq i32.eqz @@ -3381,7 +3381,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 25923 i32.eq i32.eqz @@ -3400,7 +3400,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 17247 i32.eq i32.eqz @@ -4232,7 +4232,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const -13360 i32.eq i32.eqz @@ -4256,7 +4256,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 14689 i32.eq i32.eqz diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 1fea671e67..fbe749fb7e 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -104,7 +104,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $0 local.get $1 local.get $0 diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index f6ff9e6e66..1455f2e847 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -48,7 +48,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index 6536303264..fa88fcc653 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -21,7 +21,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u i32.const 1 i32.shl local.set $3 diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index b8de60bda0..91e00d5a33 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -20,7 +20,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/rt/stub/__release (param $0 i32) nop @@ -94,7 +94,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -104,7 +104,7 @@ local.get $1 local.get $0 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -114,7 +114,7 @@ local.get $1 local.get $0 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -130,7 +130,7 @@ local.set $1 local.get $0 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 i32.const -2128831035 @@ -146,7 +146,7 @@ local.get $3 local.get $1 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -156,7 +156,7 @@ local.get $3 local.get $1 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -166,7 +166,7 @@ local.get $3 local.get $1 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -182,7 +182,7 @@ local.get $3 local.get $2 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -192,7 +192,7 @@ local.get $3 local.get $2 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -202,7 +202,7 @@ local.get $3 local.get $2 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index a5c7959ae5..117298a2c0 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -89,7 +89,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -100,7 +100,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -390,7 +390,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -401,7 +401,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -717,7 +717,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -744,7 +744,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -976,7 +976,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1333,12 +1333,10 @@ i32.const 0 else local.get $0 - i32.load8_s + i32.load8_u local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.eq end if @@ -1362,7 +1360,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 call $~lib/map/Map#find i32.const 0 @@ -1511,7 +1509,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 local.tee $5 call $~lib/map/Map#find @@ -1607,7 +1605,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $0 @@ -1922,13 +1920,13 @@ i32.load offset=8 local.tee $5 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 1200 @@ -2535,7 +2533,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 local.set $4 local.get $0 @@ -2561,12 +2559,10 @@ i32.const 0 else local.get $1 - i32.load8_s + i32.load8_u local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.eq end br_if $__inlined_func$~lib/map/Map#find @@ -2676,7 +2672,7 @@ i32.mul local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -2684,7 +2680,7 @@ i32.mul local.get $0 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -2692,7 +2688,7 @@ i32.mul local.get $0 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -2974,7 +2970,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $1 @@ -2997,7 +2993,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 1 i32.add @@ -3100,9 +3096,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 100 - i32.lt_u + i32.lt_s if local.get $0 local.get $1 @@ -3121,7 +3117,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 10 i32.add call $~lib/map/Map#set @@ -3145,7 +3141,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 10 i32.add i32.ne @@ -3183,9 +3179,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 100 - i32.lt_u + i32.lt_s if local.get $0 local.get $1 @@ -3206,7 +3202,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 10 i32.add i32.ne @@ -3224,7 +3220,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 20 i32.add call $~lib/map/Map#set @@ -3248,7 +3244,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 20 i32.add i32.ne @@ -3416,9 +3412,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 50 - i32.lt_u + i32.lt_s if local.get $0 local.get $2 @@ -3439,7 +3435,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 20 i32.add i32.ne @@ -3491,9 +3487,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 50 - i32.lt_u + i32.lt_s if local.get $0 local.get $2 @@ -3512,7 +3508,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 10 i32.add call $~lib/map/Map#set @@ -3585,49 +3581,6 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=8 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=8 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -3635,7 +3588,7 @@ i32.const 255 i32.and call $~lib/util/hash/hash8 - call $~lib/map/Map#find + call $~lib/map/Map#find i32.const 0 i32.ne ) @@ -3783,7 +3736,7 @@ i32.and call $~lib/util/hash/hash8 local.tee $5 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $3 if local.get $3 @@ -3876,7 +3829,7 @@ i32.const 255 i32.and call $~lib/util/hash/hash8 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $0 i32.eqz if @@ -4280,7 +4233,7 @@ i32.const 255 i32.and call $~lib/util/hash/hash8 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $1 i32.eqz if @@ -4301,7 +4254,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 1 i32.add @@ -4844,7 +4797,7 @@ i32.mul local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -4872,12 +4825,10 @@ i32.const 0 else local.get $0 - i32.load16_s + i32.load16_u local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.eq end if @@ -4901,7 +4852,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 call $~lib/map/Map#find i32.const 0 @@ -5050,7 +5001,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 local.tee $5 call $~lib/map/Map#find @@ -5146,7 +5097,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 call $~lib/map/Map#find local.tee $0 @@ -5471,7 +5422,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 local.set $4 local.get $0 @@ -5497,12 +5448,10 @@ i32.const 0 else local.get $1 - i32.load16_s + i32.load16_u local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.eq end br_if $__inlined_func$~lib/map/Map#find @@ -5610,7 +5559,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 call $~lib/map/Map#find local.tee $1 @@ -5633,7 +5582,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 1 i32.add @@ -5703,9 +5652,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 100 - i32.lt_u + i32.lt_s if local.get $0 local.get $1 @@ -5724,7 +5673,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 10 i32.add call $~lib/map/Map#set @@ -5748,7 +5697,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 10 i32.add i32.ne @@ -5786,9 +5735,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 100 - i32.lt_u + i32.lt_s if local.get $0 local.get $1 @@ -5809,7 +5758,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 10 i32.add i32.ne @@ -5827,7 +5776,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 20 i32.add call $~lib/map/Map#set @@ -5851,7 +5800,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 20 i32.add i32.ne @@ -6021,9 +5970,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 50 - i32.lt_u + i32.lt_s if local.get $0 local.get $2 @@ -6044,7 +5993,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 20 i32.add i32.ne @@ -6096,9 +6045,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 50 - i32.lt_u + i32.lt_s if local.get $0 local.get $2 @@ -6117,7 +6066,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 10 i32.add call $~lib/map/Map#set @@ -6190,49 +6139,6 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=8 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=8 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -6240,7 +6146,7 @@ i32.const 65535 i32.and call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#find i32.const 0 i32.ne ) @@ -6388,7 +6294,7 @@ i32.and call $~lib/util/hash/hash16 local.tee $5 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $3 if local.get $3 @@ -6481,7 +6387,7 @@ i32.const 65535 i32.and call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $0 i32.eqz if @@ -6889,7 +6795,7 @@ i32.const 65535 i32.and call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#find local.tee $1 i32.eqz if @@ -6910,7 +6816,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 1 i32.add @@ -7500,7 +7406,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 1 i32.add @@ -8589,7 +8495,7 @@ i32.mul local.get $1 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -8597,7 +8503,7 @@ i32.mul local.get $1 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -8605,13 +8511,13 @@ i32.mul local.get $1 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul local.get $0 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $1 i32.const 255 @@ -8621,7 +8527,7 @@ i32.mul local.get $1 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -8629,7 +8535,7 @@ i32.mul local.get $1 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -8637,7 +8543,7 @@ i32.mul local.get $1 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -9471,7 +9377,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 i32.const 1 i32.add @@ -11310,7 +11216,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 i32.const 1 i32.add @@ -12578,7 +12484,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 i32.const 1 i32.add diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 5feabe4c57..0d84e733ec 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -113,7 +113,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -125,7 +125,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -499,7 +499,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -511,7 +511,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -824,7 +824,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -988,7 +988,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1018,7 +1018,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1208,7 +1208,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1874,7 +1874,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq else i32.const 0 @@ -1916,7 +1916,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.0 end @@ -2113,7 +2113,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.1 end @@ -2234,7 +2234,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.3 end @@ -2287,7 +2287,7 @@ local.get $1 i32.const 1073741808 i32.const 0 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -2649,7 +2649,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2665,7 +2665,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2681,7 +2681,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2697,7 +2697,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2770,7 +2770,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2786,7 +2786,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2802,7 +2802,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2818,7 +2818,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2877,7 +2877,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2893,7 +2893,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2909,7 +2909,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2925,7 +2925,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -3799,13 +3799,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -4006,7 +4006,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -4359,7 +4359,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq else i32.const 0 @@ -4569,7 +4569,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.4 end @@ -4683,7 +4683,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -4693,7 +4693,7 @@ local.get $1 local.get $0 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -4703,7 +4703,7 @@ local.get $1 local.get $0 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -5090,7 +5090,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.6 end @@ -5121,7 +5121,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -5222,7 +5222,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 100 i32.lt_s local.set $3 @@ -5248,7 +5248,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -5272,7 +5272,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.add i32.eq i32.eqz @@ -5311,7 +5311,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 100 i32.lt_s local.set $4 @@ -5337,7 +5337,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.add i32.eq i32.eqz @@ -5356,7 +5356,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -5380,7 +5380,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.add i32.eq i32.eqz @@ -5522,7 +5522,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 50 i32.lt_s local.set $10 @@ -5548,7 +5548,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.add i32.eq i32.eqz @@ -5604,7 +5604,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 50 i32.lt_s local.set $9 @@ -5630,7 +5630,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -6185,7 +6185,7 @@ local.get $1 i32.const 1073741808 i32.const 0 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -6894,7 +6894,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -7515,7 +7515,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -7553,7 +7553,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eq else i32.const 0 @@ -7599,7 +7599,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.0 end @@ -7804,7 +7804,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.1 end @@ -7929,7 +7929,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.3 end @@ -7982,7 +7982,7 @@ local.get $1 i32.const 1073741808 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -8329,7 +8329,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eq else i32.const 0 @@ -8547,7 +8547,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.4 end @@ -8678,7 +8678,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.6 end @@ -8709,7 +8709,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -8810,7 +8810,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 100 i32.lt_s local.set $3 @@ -8836,7 +8836,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -8860,7 +8860,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.add i32.eq i32.eqz @@ -8899,7 +8899,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 100 i32.lt_s local.set $4 @@ -8925,7 +8925,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.add i32.eq i32.eqz @@ -8944,7 +8944,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -8968,7 +8968,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.add i32.eq i32.eqz @@ -9110,7 +9110,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 50 i32.lt_s local.set $10 @@ -9136,7 +9136,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.add i32.eq i32.eqz @@ -9192,7 +9192,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 50 i32.lt_s local.set $9 @@ -9218,7 +9218,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release @@ -9789,7 +9789,7 @@ local.get $1 i32.const 1073741808 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -10510,7 +10510,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -11347,7 +11347,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -12389,7 +12389,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -13116,7 +13116,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -13707,7 +13707,7 @@ local.set $1 local.get $0 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 i32.const -2128831035 @@ -13723,7 +13723,7 @@ local.get $3 local.get $1 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -13733,7 +13733,7 @@ local.get $3 local.get $1 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -13743,7 +13743,7 @@ local.get $3 local.get $1 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -13759,7 +13759,7 @@ local.get $3 local.get $2 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -13769,7 +13769,7 @@ local.get $3 local.get $2 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -13779,7 +13779,7 @@ local.get $3 local.get $2 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -14264,7 +14264,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -15006,7 +15006,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -16074,7 +16074,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -16816,7 +16816,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -17840,7 +17840,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -18549,7 +18549,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -19589,7 +19589,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -20310,7 +20310,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index f5d9838858..9eaec6027b 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -186,7 +186,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -194,7 +194,7 @@ local.get $1 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -229,7 +229,7 @@ local.get $1 i64.reinterpret_f64 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and i32.wrap_i64 @@ -375,13 +375,13 @@ local.get $0 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne local.get $1 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne i32.eq @@ -414,7 +414,7 @@ local.get $1 i32.reinterpret_f32 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.tee $3 @@ -552,7 +552,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $3 i32.const 2147483647 @@ -572,7 +572,7 @@ if local.get $3 i32.const 31 - i32.shr_s + i32.shr_u if f64.const 3.141592653589793 return @@ -614,7 +614,7 @@ end local.get $3 i32.const 31 - i32.shr_s + i32.shr_u if f64.const 1.5707963267948966 local.get $0 @@ -723,7 +723,7 @@ if local.get $3 i32.const 31 - i32.shr_s + i32.shr_u if f32.const 3.141592502593994 return @@ -765,7 +765,7 @@ end local.get $3 i32.const 31 - i32.shr_s + i32.shr_u if f32.const 1.570796251296997 local.get $0 @@ -840,11 +840,11 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 i32.const 31 - i32.shr_s + i32.shr_u local.get $2 i32.const 1071284858 i32.lt_u @@ -907,13 +907,13 @@ i64.reinterpret_f64 local.tee $5 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 614242 i32.add local.tee $2 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub local.tee $3 @@ -1035,11 +1035,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 1048576 i32.lt_u @@ -1059,7 +1059,7 @@ end local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if local.get $0 local.get $0 @@ -1076,7 +1076,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $1 else @@ -1171,7 +1171,7 @@ local.get $5 local.get $1 i32.const 20 - i32.shr_u + i32.shr_s i32.const 1023 i32.sub i32.add @@ -1196,7 +1196,7 @@ local.get $0 i64.reinterpret_f64 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.tee $4 @@ -1272,7 +1272,7 @@ i32.reinterpret_f32 local.tee $2 i32.const 31 - i32.shr_s + i32.shr_u local.get $2 i32.const 1054086096 i32.lt_u @@ -1338,7 +1338,7 @@ i32.add local.tee $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 127 i32.sub local.tee $3 @@ -1438,7 +1438,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 8388608 i32.lt_u @@ -1458,7 +1458,7 @@ end local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if local.get $0 local.get $0 @@ -1541,7 +1541,7 @@ local.get $4 local.get $1 i32.const 23 - i32.shr_u + i32.shr_s i32.const 127 i32.sub i32.add @@ -1622,7 +1622,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $4 i32.const 2147483647 @@ -1744,7 +1744,7 @@ local.set $0 local.get $4 i32.const 31 - i32.shr_s + i32.shr_u if local.get $0 f64.neg @@ -1869,7 +1869,7 @@ local.set $0 local.get $4 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.tee $4 @@ -2019,7 +2019,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -2453,7 +2453,7 @@ local.get $3 i64.reinterpret_f64 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.tee $4 @@ -2586,7 +2586,7 @@ i64.reinterpret_f64 local.tee $6 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $4 local.get $6 @@ -2599,7 +2599,7 @@ local.tee $7 local.get $6 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $5 i32.const 1072693248 @@ -2611,16 +2611,14 @@ call $~lib/math/NativeMath.atan return end - local.get $4 - i32.const 31 - i32.shr_s - i32.const 1 - i32.and local.get $5 i32.const 30 - i32.shr_s + i32.shr_u i32.const 2 i32.and + local.get $4 + i32.const 31 + i32.shr_u i32.or local.set $2 local.get $5 @@ -2817,16 +2815,14 @@ call $~lib/math/NativeMathf.atan return end - local.get $3 - i32.const 31 - i32.shr_s - i32.const 1 - i32.and local.get $4 i32.const 30 - i32.shr_s + i32.shr_u i32.const 2 i32.and + local.get $3 + i32.const 31 + i32.shr_u i32.or local.set $2 local.get $4 @@ -3004,7 +3000,7 @@ i64.reinterpret_f64 local.tee $4 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -3027,7 +3023,7 @@ i64.reinterpret_f64 local.tee $4 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -3283,7 +3279,7 @@ i64.sub local.tee $2 i64.const 6 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 3 i32.shl @@ -3313,7 +3309,7 @@ local.get $2 i64.sub local.tee $3 - i64.shr_s + i64.shr_u i64.or local.set $6 local.get $4 @@ -3321,7 +3317,7 @@ i64.shl local.get $1 local.get $3 - i64.shr_s + i64.shr_u i64.or local.set $4 local.get $1 @@ -3330,7 +3326,7 @@ local.get $7 i64.load offset=24 local.get $3 - i64.shr_s + i64.shr_u i64.or local.set $1 end @@ -3345,7 +3341,7 @@ local.tee $3 local.get $4 i64.const 32 - i64.shr_s + i64.shr_u local.tee $8 i64.mul local.get $4 @@ -3356,13 +3352,13 @@ i64.mul local.tee $9 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $4 local.get $5 local.get $2 i64.const 32 - i64.shr_s + i64.shr_u local.tee $5 i64.mul local.get $4 @@ -3375,11 +3371,11 @@ i64.mul local.get $4 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $3 i64.const 32 - i64.shr_s + i64.shr_u i64.add global.set $~lib/math/res128_hi global.get $~lib/math/res128_hi @@ -3387,10 +3383,10 @@ local.get $6 i64.mul i64.add - local.get $1 + local.get $2 i64.const 32 i64.shr_s - local.get $2 + local.get $1 i64.const 32 i64.shr_u i64.mul @@ -3413,14 +3409,14 @@ i64.shl local.get $2 i64.const 62 - i64.shr_s + i64.shr_u i64.or local.tee $6 i64.const 63 - i64.shr_u + i64.shr_s local.tee $1 i64.const 1 - i64.shr_u + i64.shr_s local.get $6 i64.xor local.tee $3 @@ -3438,7 +3434,7 @@ i64.const 64 local.get $4 i64.sub - i64.shr_s + i64.shr_u i64.or local.tee $2 i64.const 4294967295 @@ -3446,19 +3442,19 @@ local.set $3 local.get $2 i64.const 32 - i64.shr_s + i64.shr_u local.tee $9 i64.const 560513588 i64.mul local.get $3 - i64.const -921707870 + i64.const 3373259426 i64.mul local.get $3 i64.const 560513588 i64.mul local.tee $10 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $11 i64.const 4294967295 @@ -3466,15 +3462,15 @@ i64.add local.set $3 local.get $9 - i64.const -921707870 + i64.const 3373259426 i64.mul local.get $11 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $3 i64.const 32 - i64.shr_s + i64.shr_u i64.add global.set $~lib/math/res128_hi local.get $10 @@ -3503,7 +3499,7 @@ global.get $~lib/math/res128_hi local.tee $5 i64.const 11 - i64.shr_s + i64.shr_u i64.add f64.convert_i64_u global.set $~lib/math/rempio2_y0 @@ -3513,7 +3509,7 @@ i64.shl local.get $3 i64.const 11 - i64.shr_s + i64.shr_u i64.or i64.add f64.convert_i64_u @@ -3542,7 +3538,7 @@ global.set $~lib/math/rempio2_y1 local.get $8 i64.const 62 - i64.shr_u + i64.shr_s local.get $1 i64.sub i32.wrap_i64 @@ -3559,11 +3555,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $5 i32.const 31 - i32.shr_s + i32.shr_u local.set $6 local.get $5 i32.const 2147483647 @@ -3644,7 +3640,7 @@ block $~lib/math/rempio2|inlined.0 (result i32) local.get $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -3654,7 +3650,7 @@ if local.get $5 i32.const 20 - i32.shr_s + i32.shr_u local.tee $6 local.get $0 local.get $0 @@ -3674,10 +3670,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -3707,10 +3703,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -3918,7 +3914,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_s + i32.shr_u local.set $10 local.get $1 i32.const 2147483647 @@ -4006,7 +4002,7 @@ i32.sub local.tee $1 i32.const 6 - i32.shr_u + i32.shr_s i32.const 3 i32.shl i32.const 1256 @@ -4035,14 +4031,14 @@ i64.const 96 local.get $5 i64.sub - i64.shr_s + i64.shr_u i64.or else local.get $7 i64.const 32 local.get $5 i64.sub - i64.shr_s + i64.shr_u end local.set $11 f64.const 8.515303950216386e-20 @@ -4063,14 +4059,14 @@ i64.const 64 local.get $5 i64.sub - i64.shr_s + i64.shr_u i64.or i64.mul local.get $8 local.get $11 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $6 i64.const 2 @@ -4082,10 +4078,10 @@ i32.const 0 local.get $6 i64.const 62 - i64.shr_s + i64.shr_u local.get $8 i64.const 63 - i64.shr_s + i64.shr_u i64.add i32.wrap_i64 local.tee $1 @@ -4188,12 +4184,12 @@ i64.reinterpret_f64 local.tee $8 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $7 local.get $8 i64.const 32 - i64.shr_s + i64.shr_u i64.const 2147483647 i64.and i32.wrap_i64 @@ -4457,11 +4453,11 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 i32.const 31 - i32.shr_s + i32.shr_u local.set $6 local.get $2 i32.const 2147483647 @@ -4686,7 +4682,7 @@ i32.reinterpret_f32 local.tee $4 i32.const 31 - i32.shr_s + i32.shr_u local.set $6 local.get $4 i32.const 2147483647 @@ -4932,7 +4928,7 @@ i32.reinterpret_f32 local.tee $2 i32.const 31 - i32.shr_s + i32.shr_u local.set $4 local.get $2 i32.const 2147483647 @@ -5178,7 +5174,7 @@ i64.reinterpret_f64 local.tee $3 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and i32.wrap_i64 @@ -5217,7 +5213,7 @@ f64.const inf local.get $3 i64.const 63 - i64.shr_s + i64.shr_u i64.eqz br_if $~lib/util/math/exp2_lut|inlined.0 drop @@ -5398,7 +5394,7 @@ i32.reinterpret_f32 local.tee $2 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and local.tee $3 @@ -5540,7 +5536,7 @@ local.set $1 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $6 i32.const 2047 @@ -5557,7 +5553,7 @@ i64.eqz local.get $3 i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $10 i32.const 2047 @@ -5582,7 +5578,7 @@ local.set $9 local.get $10 i32.const 1533 - i32.gt_s + i32.gt_u if (result f64) f64.const 5260135901548373507240989e186 local.set $9 @@ -5596,7 +5592,7 @@ else local.get $6 i32.const 573 - i32.lt_s + i32.lt_u if (result f64) f64.const 1.90109156629516e-211 local.set $9 @@ -5838,11 +5834,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 1048576 i32.lt_u @@ -5862,7 +5858,7 @@ end local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if local.get $0 local.get $0 @@ -5879,7 +5875,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $1 else @@ -5935,7 +5931,7 @@ local.get $8 local.get $1 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub i32.add @@ -6052,7 +6048,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 8388608 i32.lt_u @@ -6072,7 +6068,7 @@ end local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if local.get $0 local.get $0 @@ -6128,7 +6124,7 @@ local.get $5 local.get $1 i32.const 23 - i32.shr_s + i32.shr_u i32.const 127 i32.sub i32.add @@ -6241,11 +6237,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 1048576 i32.lt_u @@ -6265,7 +6261,7 @@ end local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if local.get $0 local.get $0 @@ -6282,7 +6278,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $1 else @@ -6338,7 +6334,7 @@ local.get $8 local.get $1 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub i32.add @@ -6447,7 +6443,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_s + i32.shr_u local.get $1 i32.const 8388608 i32.lt_u @@ -6467,7 +6463,7 @@ end local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if local.get $0 local.get $0 @@ -6576,7 +6572,7 @@ local.get $5 local.get $1 i32.const 23 - i32.shr_s + i32.shr_u i32.const 127 i32.sub i32.add @@ -6667,7 +6663,7 @@ i64.reinterpret_f64 local.tee $3 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $5 @@ -6675,7 +6671,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 63 - i64.shr_s + i64.shr_u local.set $7 i32.const 1 local.get $1 @@ -6684,7 +6680,7 @@ i32.const 1 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.tee $4 @@ -6739,6 +6735,8 @@ i64.shl else local.get $2 + i64.const 4503599627370495 + i64.and i64.const 4503599627370496 i64.or end @@ -6761,6 +6759,8 @@ i64.shl else local.get $3 + i64.const 4503599627370495 + i64.and i64.const 4503599627370496 i64.or end @@ -6836,7 +6836,7 @@ i64.sub i64.const 1 i64.add - i64.shr_s + i64.shr_u end local.get $7 i64.const 63 @@ -6892,7 +6892,7 @@ i32.reinterpret_f32 local.tee $3 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $5 @@ -6908,7 +6908,7 @@ f32.ne local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.tee $4 @@ -6948,6 +6948,8 @@ local.get $4 if (result i32) local.get $2 + i32.const 8388607 + i32.and i32.const 8388608 i32.or else @@ -6967,6 +6969,8 @@ local.get $5 if (result i32) local.get $3 + i32.const 8388607 + i32.and i32.const 8388608 i32.or else @@ -7052,7 +7056,7 @@ i32.const 1 local.get $4 i32.sub - i32.shr_s + i32.shr_u end local.get $7 i32.or @@ -7149,7 +7153,7 @@ local.set $18 local.get $14 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $16 i32.const 2147483647 @@ -7159,7 +7163,7 @@ i64.reinterpret_f64 local.tee $14 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $8 i32.const 2147483647 @@ -7240,7 +7244,7 @@ select local.tee $5 local.get $12 - i32.shr_s + i32.shr_u local.tee $11 i32.const 1 i32.and @@ -7545,7 +7549,7 @@ local.tee $3 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $4 i32.const -53 @@ -7554,7 +7558,7 @@ end local.get $4 i32.const 20 - i32.shr_u + i32.shr_s i32.const 1023 i32.sub i32.add @@ -7660,7 +7664,7 @@ local.get $15 local.get $4 i32.const 1 - i32.shr_u + i32.shr_s i32.const 536870912 i32.or i32.const 524288 @@ -7796,7 +7800,7 @@ block $folding-inner0 local.get $14 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $12 i32.const 1083179008 @@ -7859,7 +7863,7 @@ local.get $5 i32.const 1 i32.add - i32.shr_u + i32.shr_s i32.add local.tee $11 i32.const 2147483647 @@ -7869,7 +7873,7 @@ i32.const 1023 i32.sub local.tee $5 - i32.shr_u + i32.shr_s i32.const -1 i32.xor local.get $11 @@ -7888,7 +7892,7 @@ i32.const 20 local.get $5 i32.sub - i32.shr_u + i32.shr_s local.tee $6 i32.sub local.get $6 @@ -7976,7 +7980,7 @@ local.tee $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.get $6 i32.const 20 @@ -7984,9 +7988,9 @@ i32.add local.tee $5 i32.const 20 - i32.shr_u + i32.shr_s i32.const 0 - i32.le_u + i32.le_s if (result f64) local.get $0 local.get $6 @@ -8131,7 +8135,7 @@ i32.const 0 local.get $4 i32.const 31 - i32.shr_s + i32.shr_u local.tee $4 select if @@ -8179,7 +8183,7 @@ i32.const 2139095040 local.get $5 i32.const 31 - i32.shr_s + i32.shr_u select else local.get $4 @@ -8194,7 +8198,7 @@ i64.const 4604544271217802189 i64.sub i64.const 52 - i64.shr_u + i64.shr_s local.set $7 local.get $10 local.get $7 @@ -8307,7 +8311,7 @@ i32.const 0 local.get $5 i32.const 31 - i32.shr_s + i32.shr_u select end end @@ -8327,21 +8331,21 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor i64.const -49064778989728563 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor i64.const -4265267296055464877 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor ) (func $~lib/math/splitMix32 (param $0 i32) (result i32) @@ -8351,7 +8355,7 @@ local.tee $0 local.get $0 i32.const 15 - i32.shr_s + i32.shr_u i32.xor local.get $0 i32.const 1 @@ -8365,7 +8369,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_s + i32.shr_u i32.xor i32.mul i32.add @@ -8373,7 +8377,7 @@ local.tee $0 local.get $0 i32.const 14 - i32.shr_s + i32.shr_u i32.xor ) (func $~lib/math/NativeMath.seedRandom (param $0 i64) @@ -8491,7 +8495,7 @@ i64.reinterpret_f64 local.tee $4 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $5 @@ -8499,7 +8503,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $7 i32.const 1 @@ -8509,7 +8513,7 @@ i32.const 1 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.tee $3 @@ -8556,6 +8560,8 @@ i64.shl else local.get $2 + i64.const 4503599627370495 + i64.and i64.const 4503599627370496 i64.or end @@ -8578,6 +8584,8 @@ i64.shl else local.get $4 + i64.const 4503599627370495 + i64.and i64.const 4503599627370496 i64.or end @@ -8684,7 +8692,7 @@ i64.sub i64.const 1 i64.add - i64.shr_s + i64.shr_u local.get $3 i64.const 0 i64.gt_s @@ -8744,7 +8752,7 @@ i32.reinterpret_f32 local.tee $6 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $8 @@ -8752,7 +8760,7 @@ i32.reinterpret_f32 local.tee $3 i32.const 31 - i32.shr_s + i32.shr_u local.set $5 i32.const 1 local.get $1 @@ -8761,7 +8769,7 @@ local.get $3 local.tee $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.tee $9 @@ -8793,6 +8801,8 @@ local.get $9 if (result i32) local.get $2 + i32.const 8388607 + i32.and i32.const 8388608 i32.or else @@ -8812,6 +8822,8 @@ local.get $8 if (result i32) local.get $6 + i32.const 8388607 + i32.and i32.const 8388608 i32.or else @@ -8927,7 +8939,7 @@ i32.const 1 local.get $9 i32.sub - i32.shr_s + i32.shr_u local.get $9 i32.const 0 i32.gt_s @@ -8986,11 +8998,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $5 i32.const 31 - i32.shr_s + i32.shr_u local.set $6 local.get $5 i32.const 2147483647 @@ -9054,7 +9066,7 @@ block $~lib/math/rempio2|inlined.1 (result i32) local.get $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -9064,7 +9076,7 @@ if local.get $5 i32.const 20 - i32.shr_s + i32.shr_u local.tee $6 local.get $0 local.get $0 @@ -9084,10 +9096,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -9117,10 +9129,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -9327,7 +9339,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_s + i32.shr_u local.set $11 local.get $1 i32.const 2147483647 @@ -9417,7 +9429,7 @@ i32.sub local.tee $1 i32.const 6 - i32.shr_u + i32.shr_s i32.const 3 i32.shl i32.const 1256 @@ -9446,14 +9458,14 @@ i64.const 96 local.get $5 i64.sub - i64.shr_s + i64.shr_u i64.or else local.get $8 i64.const 32 local.get $5 i64.sub - i64.shr_s + i64.shr_u end local.set $12 f64.const 8.515303950216386e-20 @@ -9474,14 +9486,14 @@ i64.const 64 local.get $5 i64.sub - i64.shr_s + i64.shr_u i64.or i64.mul local.get $9 local.get $12 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 2 @@ -9493,10 +9505,10 @@ i32.const 0 local.get $7 i64.const 62 - i64.shr_s + i64.shr_u local.get $9 i64.const 63 - i64.shr_s + i64.shr_u i64.add i32.wrap_i64 local.tee $1 @@ -9788,7 +9800,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $6 i32.const 2147483647 @@ -9895,7 +9907,7 @@ f64.const 1 local.get $6 i32.const 30 - i32.shr_u + i32.shr_s i32.const 2 i32.and f64.convert_i32_s @@ -9969,11 +9981,11 @@ i64.reinterpret_f64 local.tee $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $4 i32.const 31 - i32.shr_s + i32.shr_u local.set $6 local.get $4 i32.const 2147483647 @@ -10007,7 +10019,7 @@ block $~lib/math/rempio2|inlined.2 (result i32) local.get $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -10017,7 +10029,7 @@ if local.get $4 i32.const 20 - i32.shr_s + i32.shr_u local.tee $6 local.get $0 local.get $0 @@ -10037,10 +10049,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -10070,10 +10082,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -10170,7 +10182,7 @@ i32.reinterpret_f32 local.tee $1 i32.const 31 - i32.shr_s + i32.shr_u local.set $11 local.get $1 i32.const 2147483647 @@ -10269,7 +10281,7 @@ i32.sub local.tee $1 i32.const 6 - i32.shr_u + i32.shr_s i32.const 3 i32.shl i32.const 1256 @@ -10298,14 +10310,14 @@ i64.const 96 local.get $6 i64.sub - i64.shr_s + i64.shr_u i64.or else local.get $8 i64.const 32 local.get $6 i64.sub - i64.shr_s + i64.shr_u end local.set $12 f64.const 8.515303950216386e-20 @@ -10326,14 +10338,14 @@ i64.const 64 local.get $6 i64.sub - i64.shr_s + i64.shr_u i64.or i64.mul local.get $9 local.get $12 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 2 @@ -10345,10 +10357,10 @@ i32.const 0 local.get $7 i64.const 62 - i64.shr_s + i64.shr_u local.get $9 i64.const 63 - i64.shr_s + i64.shr_u i64.add i32.wrap_i64 local.tee $1 @@ -10619,11 +10631,11 @@ i64.reinterpret_f64 local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $5 i32.const 31 - i32.shr_s + i32.shr_u local.set $6 local.get $5 i32.const 2147483647 @@ -10742,7 +10754,7 @@ block $~lib/math/rempio2|inlined.3 (result i32) local.get $3 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -10752,7 +10764,7 @@ if local.get $5 i32.const 20 - i32.shr_s + i32.shr_u local.tee $6 local.get $0 local.get $0 @@ -10772,10 +10784,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -10805,10 +10817,10 @@ local.tee $1 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -11079,7 +11091,7 @@ local.set $2 local.get $1 i64.const 1 - i64.shr_s + i64.shr_u local.set $1 local.get $0 local.get $0 @@ -11108,7 +11120,7 @@ local.set $2 local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -38254,17 +38266,17 @@ local.tee $2 local.get $2 i64.const 17 - i64.shr_s + i64.shr_u i64.xor i64.xor local.get $3 i64.const 26 - i64.shr_s + i64.shr_u i64.xor global.set $~lib/math/random_state1_64 local.get $3 i64.const 12 - i64.shr_s + i64.shr_u i64.const 4607182418800017408 i64.or f64.reinterpret_i64 @@ -38338,7 +38350,7 @@ i32.const 5 i32.mul i32.const 9 - i32.shr_s + i32.shr_u i32.const 1065353216 i32.or f32.reinterpret_i32 @@ -48371,10 +48383,8 @@ i32.const 1 i32.const 3 call $~lib/math/ipow32 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.const 1 i32.ne if @@ -48388,11 +48398,9 @@ i32.const -2 i32.const 3 call $~lib/math/ipow32 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u - i32.const -8 + i32.const 255 + i32.and + i32.const 248 i32.ne if i32.const 0 diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index bbaf893b92..33c9a4432c 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -133,7 +133,7 @@ local.set $1 local.get $1 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and i32.wrap_i64 @@ -268,7 +268,7 @@ local.get $3 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -278,7 +278,7 @@ local.get $3 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -363,7 +363,7 @@ local.set $1 local.get $1 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $2 @@ -496,7 +496,7 @@ local.get $3 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne local.get $1 @@ -504,7 +504,7 @@ local.get $3 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne i32.eq @@ -700,7 +700,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $1 local.get $1 @@ -725,7 +725,7 @@ if local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if f64.const 2 f64.const 1.5707963267948966 @@ -775,7 +775,7 @@ end local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if f64.const 0.5 local.get $0 @@ -914,7 +914,7 @@ if local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if f32.const 2 f32.const 1.570796251296997 @@ -962,7 +962,7 @@ end local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if f32.const 0.5 local.get $0 @@ -1058,7 +1058,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 i32.const 1 @@ -1075,7 +1075,7 @@ else local.get $2 i32.const 31 - i32.shr_s + i32.shr_u end if local.get $2 @@ -1138,7 +1138,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $6 local.get $6 @@ -1149,7 +1149,7 @@ local.set $6 local.get $6 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub local.set $3 @@ -1419,7 +1419,7 @@ end local.get $2 i64.const 48 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $12 local.get $12 @@ -1493,14 +1493,14 @@ i64.const 52 i64.const 7 i64.sub - i64.shr_s + i64.shr_u i64.const 127 i64.and i32.wrap_i64 local.set $14 local.get $13 i64.const 52 - i64.shr_u + i64.shr_s local.set $15 local.get $2 local.get $13 @@ -1617,7 +1617,7 @@ local.get $0 i64.reinterpret_f64 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $1 @@ -1732,7 +1732,7 @@ else local.get $1 i32.const 31 - i32.shr_s + i32.shr_u end if local.get $1 @@ -1803,7 +1803,7 @@ local.set $6 local.get $6 i32.const 23 - i32.shr_s + i32.shr_u i32.const 127 i32.sub local.set $4 @@ -1962,7 +1962,7 @@ end local.get $2 i32.const 31 - i32.shr_s + i32.shr_u if (result i32) i32.const 1 else @@ -2002,13 +2002,13 @@ i32.const 23 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 15 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_u + i32.shr_s local.set $5 local.get $2 local.get $3 @@ -2166,7 +2166,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $1 local.get $1 @@ -2305,7 +2305,7 @@ end local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if local.get $0 f64.neg @@ -2446,7 +2446,7 @@ local.set $1 local.get $1 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $2 @@ -2645,7 +2645,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $1 local.get $0 @@ -3161,7 +3161,7 @@ local.set $1 local.get $1 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $2 @@ -3336,7 +3336,7 @@ local.set $2 local.get $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $3 local.get $2 @@ -3347,7 +3347,7 @@ local.set $2 local.get $2 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $5 local.get $2 @@ -3367,12 +3367,12 @@ end local.get $5 i32.const 31 - i32.shr_s + i32.shr_u i32.const 1 i32.and local.get $3 i32.const 30 - i32.shr_s + i32.shr_u i32.const 2 i32.and i32.or @@ -3674,12 +3674,12 @@ end local.get $3 i32.const 31 - i32.shr_s + i32.shr_u i32.const 1 i32.and local.get $2 i32.const 30 - i32.shr_s + i32.shr_u i32.const 2 i32.and i32.or @@ -3931,7 +3931,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -3956,7 +3956,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -4292,7 +4292,7 @@ local.set $2 local.get $2 i64.const 52 - i64.shr_u + i64.shr_s i64.const 1045 i64.sub local.set $3 @@ -4303,7 +4303,7 @@ i32.const 4408 local.get $3 i64.const 6 - i64.shr_u + i64.shr_s i32.wrap_i64 i32.const 3 i32.shl @@ -4332,7 +4332,7 @@ local.set $13 local.get $10 local.get $12 - i64.shr_s + i64.shr_u local.get $9 local.get $4 i64.shl @@ -4340,7 +4340,7 @@ local.set $6 local.get $11 local.get $12 - i64.shr_s + i64.shr_u local.get $10 local.get $4 i64.shl @@ -4348,7 +4348,7 @@ local.set $7 local.get $13 local.get $12 - i64.shr_s + i64.shr_u local.get $11 local.get $4 i64.shl @@ -4382,11 +4382,11 @@ local.set $16 local.get $13 i64.const 32 - i64.shr_s + i64.shr_u local.set $13 local.get $12 i64.const 32 - i64.shr_s + i64.shr_u local.set $12 local.get $15 local.get $16 @@ -4401,12 +4401,12 @@ i64.mul local.get $19 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $19 local.get $19 i64.const 32 - i64.shr_s + i64.shr_u local.set $18 local.get $15 local.get $12 @@ -4423,7 +4423,7 @@ i64.add local.get $19 i64.const 32 - i64.shr_s + i64.shr_u i64.add global.set $~lib/math/res128_hi local.get $19 @@ -4440,10 +4440,10 @@ local.set $22 local.get $8 i64.const 32 - i64.shr_s + i64.shr_u local.get $14 i64.const 32 - i64.shr_u + i64.shr_s i64.mul local.set $23 local.get $20 @@ -4468,20 +4468,20 @@ i64.shl local.get $24 i64.const 62 - i64.shr_s + i64.shr_u i64.or local.set $27 local.get $27 i64.const 63 - i64.shr_u + i64.shr_s local.set $28 local.get $28 i64.const 1 - i64.shr_u + i64.shr_s local.set $29 local.get $25 i64.const 62 - i64.shr_u + i64.shr_s local.get $28 i64.sub local.set $30 @@ -4504,7 +4504,7 @@ i64.const 64 local.get $19 i64.sub - i64.shr_s + i64.shr_u i64.or local.set $12 local.get $13 @@ -4525,11 +4525,11 @@ local.set $17 local.get $16 i64.const 32 - i64.shr_s + i64.shr_u local.set $16 local.get $15 i64.const 32 - i64.shr_s + i64.shr_u local.set $15 local.get $18 local.get $17 @@ -4544,12 +4544,12 @@ i64.mul local.get $33 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $33 local.get $33 i64.const 32 - i64.shr_s + i64.shr_u local.set $32 local.get $18 local.get $15 @@ -4566,7 +4566,7 @@ i64.add local.get $33 i64.const 32 - i64.shr_s + i64.shr_u i64.add global.set $~lib/math/res128_hi local.get $33 @@ -4579,11 +4579,11 @@ local.set $32 local.get $32 i64.const 11 - i64.shr_s + i64.shr_u local.set $31 local.get $33 i64.const 11 - i64.shr_s + i64.shr_u local.get $32 i64.const 53 i64.shl @@ -4673,12 +4673,12 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 local.get $2 i32.const 31 - i32.shr_s + i32.shr_u local.set $3 local.get $2 i32.const 2147483647 @@ -4776,7 +4776,7 @@ local.set $10 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -4894,7 +4894,7 @@ local.set $9 local.get $12 i32.const 20 - i32.shr_s + i32.shr_u local.set $13 local.get $8 local.get $9 @@ -4903,13 +4903,13 @@ local.get $6 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -4945,13 +4945,13 @@ local.get $6 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -5226,7 +5226,7 @@ local.set $1 local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $1 i32.const 2147483647 @@ -5612,7 +5612,7 @@ local.set $11 local.get $11 i32.const 23 - i32.shr_u + i32.shr_s i32.const 152 i32.sub local.set $13 @@ -5624,7 +5624,7 @@ i32.const 4600 local.get $13 i32.const 6 - i32.shr_u + i32.shr_s i32.const 3 i32.shl i32.add @@ -5646,7 +5646,7 @@ i64.const 96 local.get $14 i64.sub - i64.shr_s + i64.shr_u local.set $18 local.get $18 local.get $17 @@ -5661,14 +5661,14 @@ i64.const 32 local.get $14 i64.sub - i64.shr_s + i64.shr_u local.set $18 end local.get $17 i64.const 64 local.get $14 i64.sub - i64.shr_s + i64.shr_u local.get $16 local.get $14 i64.shl @@ -5688,7 +5688,7 @@ local.get $18 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $21 local.get $21 @@ -5697,10 +5697,10 @@ local.set $22 local.get $21 i64.const 62 - i64.shr_s + i64.shr_u local.get $22 i64.const 63 - i64.shr_s + i64.shr_u i64.add i32.wrap_i64 local.set $23 @@ -5841,7 +5841,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i64.const 2147483647 i64.and i32.wrap_i64 @@ -5850,7 +5850,7 @@ local.set $3 local.get $1 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $4 local.get $2 @@ -6167,7 +6167,7 @@ local.set $2 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and i32.wrap_i64 @@ -6211,7 +6211,7 @@ f64.const inf local.get $2 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne select @@ -6434,7 +6434,7 @@ local.set $0 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 local.get $2 @@ -6561,7 +6561,7 @@ local.set $2 local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.set $3 local.get $2 i32.const 1100331076 @@ -6857,7 +6857,7 @@ local.set $3 local.get $3 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and local.set $4 @@ -7036,7 +7036,7 @@ i32.const 127 i32.const 235 i32.const 1 - i32.shr_s + i32.shr_u i32.add i32.const 23 i32.shl @@ -7153,7 +7153,7 @@ local.set $2 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and i32.wrap_i64 @@ -7195,7 +7195,7 @@ end local.get $2 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.eqz @@ -7439,7 +7439,7 @@ local.set $3 local.get $3 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and local.set $4 @@ -7627,12 +7627,12 @@ end local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $5 local.get $3 i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $6 local.get $3 @@ -7989,7 +7989,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 i32.const 0 @@ -8002,7 +8002,7 @@ else local.get $2 i32.const 31 - i32.shr_s + i32.shr_u end if local.get $1 @@ -8020,7 +8020,7 @@ end local.get $2 i32.const 31 - i32.shr_s + i32.shr_u if local.get $0 local.get $0 @@ -8042,7 +8042,7 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 else @@ -8080,7 +8080,7 @@ local.get $3 local.get $2 i32.const 20 - i32.shr_s + i32.shr_u i32.const 1023 i32.sub i32.add @@ -8277,7 +8277,7 @@ else local.get $1 i32.const 31 - i32.shr_s + i32.shr_u end if local.get $1 @@ -8295,7 +8295,7 @@ end local.get $1 i32.const 31 - i32.shr_s + i32.shr_u if local.get $0 local.get $0 @@ -8341,7 +8341,7 @@ local.get $2 local.get $1 i32.const 23 - i32.shr_s + i32.shr_u i32.const 127 i32.sub i32.add @@ -8627,7 +8627,7 @@ end local.get $2 i64.const 48 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $12 local.get $12 @@ -8700,14 +8700,14 @@ i64.const 52 i64.const 6 i64.sub - i64.shr_s + i64.shr_u i64.const 63 i64.and i32.wrap_i64 local.set $14 local.get $13 i64.const 52 - i64.shr_u + i64.shr_s local.set $15 local.get $2 local.get $13 @@ -8918,7 +8918,7 @@ end local.get $2 i32.const 31 - i32.shr_s + i32.shr_u if (result i32) i32.const 1 else @@ -8958,7 +8958,7 @@ i32.const 23 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 15 i32.and local.set $4 @@ -8972,7 +8972,7 @@ local.set $6 local.get $3 i32.const 23 - i32.shr_u + i32.shr_s local.set $7 i32.const 8984 local.get $4 @@ -9174,19 +9174,19 @@ local.set $3 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $4 local.get $3 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $5 local.get $2 i64.const 63 - i64.shr_s + i64.shr_u local.set $6 local.get $3 i64.const 1 @@ -9263,7 +9263,7 @@ local.get $2 i64.const -1 i64.const 12 - i64.shr_s + i64.shr_u i64.and local.set $2 local.get $2 @@ -9297,7 +9297,7 @@ local.get $3 i64.const -1 i64.const 12 - i64.shr_s + i64.shr_u i64.and local.set $3 local.get $3 @@ -9397,7 +9397,7 @@ i64.sub i64.const 1 i64.add - i64.shr_s + i64.shr_u local.set $2 end local.get $2 @@ -9467,13 +9467,13 @@ local.set $3 local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $5 @@ -9554,7 +9554,7 @@ local.get $2 i32.const -1 i32.const 9 - i32.shr_s + i32.shr_u i32.and local.set $2 local.get $2 @@ -9586,7 +9586,7 @@ local.get $3 i32.const -1 i32.const 9 - i32.shr_s + i32.shr_u i32.and local.set $3 local.get $3 @@ -9686,7 +9686,7 @@ i32.sub i32.const 1 i32.add - i32.shr_s + i32.shr_u local.set $2 end local.get $2 @@ -9821,11 +9821,11 @@ local.set $6 local.get $5 i64.const 52 - i64.shr_s + i64.shr_u local.set $7 local.get $6 i64.const 52 - i64.shr_s + i64.shr_u local.set $8 local.get $7 i64.const 1 @@ -9912,7 +9912,7 @@ i64.lt_u local.get $6 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.eqz @@ -9944,7 +9944,7 @@ local.set $10 local.get $5 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 if (result i32) block $~lib/util/math/checkint|inlined.0 (result i32) @@ -9952,7 +9952,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $11 @@ -10014,7 +10014,7 @@ end local.get $6 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne if (result f64) @@ -10028,7 +10028,7 @@ end local.get $5 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne if @@ -10037,7 +10037,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $11 @@ -10188,14 +10188,14 @@ i64.const 52 i64.const 7 i64.sub - i64.shr_s + i64.shr_u i64.const 127 i64.and i32.wrap_i64 local.set $12 local.get $11 i64.const 52 - i64.shr_u + i64.shr_s local.set $13 local.get $9 local.get $11 @@ -10414,7 +10414,7 @@ local.set $9 local.get $9 i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2047 i32.and @@ -10443,7 +10443,7 @@ if local.get $9 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne if (result f64) @@ -10894,7 +10894,7 @@ i32.lt_u local.get $6 i32.const 31 - i32.shr_s + i32.shr_u i32.eqz i32.eq if @@ -10926,14 +10926,14 @@ local.set $9 local.get $5 i32.const 31 - i32.shr_s + i32.shr_u if (result i32) block $~lib/util/math/checkintf|inlined.0 (result i32) local.get $6 local.set $8 local.get $8 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $10 @@ -10991,7 +10991,7 @@ end local.get $6 i32.const 31 - i32.shr_s + i32.shr_u if (result f32) f32.const 1 local.get $9 @@ -11003,14 +11003,14 @@ end local.get $5 i32.const 31 - i32.shr_s + i32.shr_u if block $~lib/util/math/checkintf|inlined.1 (result i32) local.get $6 local.set $8 local.get $8 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $10 @@ -11113,7 +11113,7 @@ i32.const 23 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 15 i32.and local.set $11 @@ -11127,7 +11127,7 @@ local.set $13 local.get $12 i32.const 23 - i32.shr_u + i32.shr_s local.set $14 i32.const 8984 local.get $11 @@ -11208,7 +11208,7 @@ local.get $21 i64.reinterpret_f64 i64.const 47 - i64.shr_s + i64.shr_u i64.const 65535 i64.and i64.const 32959 @@ -11338,7 +11338,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -11348,7 +11348,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -11358,7 +11358,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -11371,7 +11371,7 @@ local.get $0 local.get $0 i32.const 15 - i32.shr_s + i32.shr_u i32.xor local.get $0 i32.const 1 @@ -11383,7 +11383,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_s + i32.shr_u i32.xor local.get $0 i32.const 61 @@ -11395,7 +11395,7 @@ local.get $0 local.get $0 i32.const 14 - i32.shr_s + i32.shr_u i32.xor ) (func $~lib/math/NativeMath.seedRandom (param $0 i64) @@ -11476,7 +11476,7 @@ local.get $0 local.get $0 i64.const 17 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -11486,14 +11486,14 @@ local.get $0 local.get $1 i64.const 26 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 global.set $~lib/math/random_state1_64 local.get $1 i64.const 12 - i64.shr_s + i64.shr_u i64.const 4607182418800017408 i64.or local.set $2 @@ -11548,7 +11548,7 @@ global.set $~lib/math/random_state1_32 local.get $3 i32.const 9 - i32.shr_s + i32.shr_u i32.const 127 i32.const 23 i32.shl @@ -11685,19 +11685,19 @@ local.set $3 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $4 local.get $3 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $5 local.get $2 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $6 local.get $3 @@ -11764,7 +11764,7 @@ local.get $8 i64.const -1 i64.const 12 - i64.shr_s + i64.shr_u i64.and local.set $8 local.get $8 @@ -11798,7 +11798,7 @@ local.get $3 i64.const -1 i64.const 12 - i64.shr_s + i64.shr_u i64.and local.set $3 local.get $3 @@ -11923,7 +11923,7 @@ i64.sub i64.const 1 i64.add - i64.shr_s + i64.shr_u local.set $8 end local.get $8 @@ -12010,19 +12010,19 @@ local.set $3 local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $5 local.get $2 i32.const 31 - i32.shr_s + i32.shr_u local.set $6 local.get $2 local.set $7 @@ -12086,7 +12086,7 @@ local.get $7 i32.const -1 i32.const 9 - i32.shr_s + i32.shr_u i32.and local.set $7 local.get $7 @@ -12118,7 +12118,7 @@ local.get $3 i32.const -1 i32.const 9 - i32.shr_s + i32.shr_u i32.and local.set $3 local.get $3 @@ -12243,7 +12243,7 @@ i32.sub i32.const 1 i32.add - i32.shr_s + i32.shr_u local.set $7 end local.get $7 @@ -12337,12 +12337,12 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 local.get $2 i32.const 31 - i32.shr_s + i32.shr_u local.set $3 local.get $2 i32.const 2147483647 @@ -12453,7 +12453,7 @@ local.set $4 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -12571,7 +12571,7 @@ local.set $10 local.get $12 i32.const 20 - i32.shr_s + i32.shr_u local.set $13 local.get $9 local.get $10 @@ -12580,13 +12580,13 @@ local.get $7 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -12622,13 +12622,13 @@ local.get $7 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -12901,7 +12901,7 @@ local.set $1 local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $1 i32.const 2147483647 @@ -13281,7 +13281,7 @@ local.set $11 local.get $11 i32.const 23 - i32.shr_u + i32.shr_s i32.const 152 i32.sub local.set $13 @@ -13293,7 +13293,7 @@ i32.const 4600 local.get $13 i32.const 6 - i32.shr_u + i32.shr_s i32.const 3 i32.shl i32.add @@ -13315,7 +13315,7 @@ i64.const 96 local.get $14 i64.sub - i64.shr_s + i64.shr_u local.set $18 local.get $18 local.get $17 @@ -13330,14 +13330,14 @@ i64.const 32 local.get $14 i64.sub - i64.shr_s + i64.shr_u local.set $18 end local.get $17 i64.const 64 local.get $14 i64.sub - i64.shr_s + i64.shr_u local.get $16 local.get $14 i64.shl @@ -13357,7 +13357,7 @@ local.get $18 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $21 local.get $21 @@ -13366,10 +13366,10 @@ local.set $22 local.get $21 i64.const 62 - i64.shr_s + i64.shr_u local.get $22 i64.const 63 - i64.shr_s + i64.shr_u i64.add i32.wrap_i64 local.set $23 @@ -13505,7 +13505,7 @@ local.set $2 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $3 f64.const 0.5 @@ -13689,7 +13689,7 @@ i32.const 127 i32.const 235 i32.const 1 - i32.shr_s + i32.shr_u i32.add i32.const 23 i32.shl @@ -13766,7 +13766,7 @@ local.get $0 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $8 local.get $8 @@ -13893,7 +13893,7 @@ f64.const 1 local.get $8 i32.const 30 - i32.shr_u + i32.shr_s i32.const 2 i32.and f64.convert_i32_s @@ -13988,12 +13988,12 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 local.get $2 i32.const 31 - i32.shr_s + i32.shr_u local.set $3 local.get $2 i32.const 2147483647 @@ -14034,7 +14034,7 @@ local.set $4 local.get $5 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -14152,7 +14152,7 @@ local.set $9 local.get $7 i32.const 20 - i32.shr_s + i32.shr_u local.set $8 local.get $10 local.get $9 @@ -14161,13 +14161,13 @@ local.get $12 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $13 local.get $8 local.get $13 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -14203,13 +14203,13 @@ local.get $12 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $13 local.get $8 local.get $13 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -14338,7 +14338,7 @@ local.set $1 local.get $1 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $1 i32.const 2147483647 @@ -14781,7 +14781,7 @@ local.set $13 local.get $13 i32.const 23 - i32.shr_u + i32.shr_s i32.const 152 i32.sub local.set $15 @@ -14793,7 +14793,7 @@ i32.const 4600 local.get $15 i32.const 6 - i32.shr_u + i32.shr_s i32.const 3 i32.shl i32.add @@ -14815,7 +14815,7 @@ i64.const 96 local.get $16 i64.sub - i64.shr_s + i64.shr_u local.set $20 local.get $20 local.get $19 @@ -14830,14 +14830,14 @@ i64.const 32 local.get $16 i64.sub - i64.shr_s + i64.shr_u local.set $20 end local.get $19 i64.const 64 local.get $16 i64.sub - i64.shr_s + i64.shr_u local.get $18 local.get $16 i64.shl @@ -14857,7 +14857,7 @@ local.get $20 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $23 @@ -14866,10 +14866,10 @@ local.set $24 local.get $23 i64.const 62 - i64.shr_s + i64.shr_u local.get $24 i64.const 63 - i64.shr_s + i64.shr_u i64.add i32.wrap_i64 local.set $25 @@ -14981,7 +14981,7 @@ local.set $2 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $3 local.get $3 @@ -15241,12 +15241,12 @@ local.set $1 local.get $1 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 local.get $2 i32.const 31 - i32.shr_s + i32.shr_u local.set $3 local.get $2 i32.const 2147483647 @@ -15428,7 +15428,7 @@ local.set $4 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and @@ -15546,7 +15546,7 @@ local.set $7 local.get $12 i32.const 20 - i32.shr_s + i32.shr_u local.set $13 local.get $8 local.get $7 @@ -15555,13 +15555,13 @@ local.get $10 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -15597,13 +15597,13 @@ local.get $10 i64.reinterpret_f64 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $14 local.get $13 local.get $14 i32.const 20 - i32.shr_s + i32.shr_u i32.const 2047 i32.and i32.sub @@ -15889,7 +15889,7 @@ local.set $2 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $3 @@ -15935,7 +15935,7 @@ local.set $4 local.get $4 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $1 i32.const 0 @@ -15944,7 +15944,7 @@ local.get $1 local.get $2 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne select @@ -16105,7 +16105,7 @@ end local.get $1 i64.const 1 - i64.shr_s + i64.shr_u local.set $1 local.get $0 local.get $0 @@ -16125,7 +16125,7 @@ end local.get $1 i64.const 1 - i64.shr_s + i64.shr_u local.set $1 local.get $0 local.get $0 @@ -16145,7 +16145,7 @@ end local.get $1 i64.const 1 - i64.shr_s + i64.shr_u local.set $1 local.get $0 local.get $0 @@ -16165,7 +16165,7 @@ end local.get $1 i64.const 1 - i64.shr_s + i64.shr_u local.set $1 local.get $0 local.get $0 @@ -16185,7 +16185,7 @@ end local.get $1 i64.const 1 - i64.shr_s + i64.shr_u local.set $1 local.get $0 local.get $0 @@ -16230,7 +16230,7 @@ end local.get $1 i64.const 1 - i64.shr_s + i64.shr_u local.set $1 local.get $0 local.get $0 @@ -16342,7 +16342,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -16360,7 +16360,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -16378,7 +16378,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -16396,7 +16396,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -16435,7 +16435,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -48452,7 +48452,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -48465,7 +48465,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -48478,7 +48478,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -48491,7 +48491,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -48504,7 +48504,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -48518,7 +48518,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -48531,7 +48531,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -48545,7 +48545,7 @@ local.get $0 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 @@ -48558,7 +48558,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne i32.const 0 @@ -48569,7 +48569,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne i32.const 1 @@ -48580,7 +48580,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne i32.const 0 @@ -48591,7 +48591,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne i32.const 1 @@ -48602,7 +48602,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne i32.const 0 @@ -48614,7 +48614,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne i32.const 1 @@ -48625,7 +48625,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne i32.const 0 @@ -48637,7 +48637,7 @@ local.get $4 i32.reinterpret_f32 i32.const 31 - i32.shr_s + i32.shr_u i32.const 0 i32.ne i32.const 1 @@ -59021,7 +59021,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 1 i32.eq i32.eqz @@ -59039,7 +59039,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const -8 i32.eq i32.eqz diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 135cc0b78f..74e16f90d7 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -38,7 +38,7 @@ i64.reinterpret_f64 local.tee $3 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $5 @@ -46,7 +46,7 @@ i64.reinterpret_f64 local.tee $2 i64.const 63 - i64.shr_s + i64.shr_u local.set $7 i32.const 1 local.get $1 @@ -55,7 +55,7 @@ i32.const 1 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.tee $4 @@ -110,6 +110,8 @@ i64.shl else local.get $2 + i64.const 4503599627370495 + i64.and i64.const 4503599627370496 i64.or end @@ -132,6 +134,8 @@ i64.shl else local.get $3 + i64.const 4503599627370495 + i64.and i64.const 4503599627370496 i64.or end @@ -207,7 +211,7 @@ i64.sub i64.const 1 i64.add - i64.shr_s + i64.shr_u end local.get $7 i64.const 63 @@ -288,7 +292,7 @@ i32.reinterpret_f32 local.tee $3 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $5 @@ -304,7 +308,7 @@ f32.ne local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.tee $4 @@ -344,6 +348,8 @@ local.get $4 if (result i32) local.get $2 + i32.const 8388607 + i32.and i32.const 8388608 i32.or else @@ -363,6 +369,8 @@ local.get $5 if (result i32) local.get $3 + i32.const 8388607 + i32.and i32.const 8388608 i32.or else @@ -448,7 +456,7 @@ i32.const 1 local.get $4 i32.sub - i32.shr_s + i32.shr_u end local.get $7 i32.or diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index f8a50aa068..942c93ec43 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -48,19 +48,19 @@ local.set $3 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $4 local.get $3 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $5 local.get $2 i64.const 63 - i64.shr_s + i64.shr_u local.set $6 local.get $3 i64.const 1 @@ -137,7 +137,7 @@ local.get $2 i64.const -1 i64.const 12 - i64.shr_s + i64.shr_u i64.and local.set $2 local.get $2 @@ -171,7 +171,7 @@ local.get $3 i64.const -1 i64.const 12 - i64.shr_s + i64.shr_u i64.and local.set $3 local.get $3 @@ -271,7 +271,7 @@ i64.sub i64.const 1 i64.add - i64.shr_s + i64.shr_u local.set $2 end local.get $2 @@ -365,13 +365,13 @@ local.set $3 local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $5 @@ -452,7 +452,7 @@ local.get $2 i32.const -1 i32.const 9 - i32.shr_s + i32.shr_u i32.and local.set $2 local.get $2 @@ -484,7 +484,7 @@ local.get $3 i32.const -1 i32.const 9 - i32.shr_s + i32.shr_u i32.and local.set $3 local.get $3 @@ -584,7 +584,7 @@ i32.sub i32.const 1 i32.add - i32.shr_s + i32.shr_u local.set $2 end local.get $2 diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 197eb660fe..fed550f22d 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -21,7 +21,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $0 local.get $1 local.get $0 diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index d68b376717..f68b606bcb 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -39,7 +39,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index 809bb31ad0..856757bab1 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -70,7 +70,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/std/object.untouched.wat b/tests/compiler/std/object.untouched.wat index e0c2eb1eba..7bccb6132b 100644 --- a/tests/compiler/std/object.untouched.wat +++ b/tests/compiler/std/object.untouched.wat @@ -102,7 +102,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 3f96a6d865..49e1f223da 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -103,7 +103,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 @@ -171,7 +171,7 @@ local.set $2 local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -851,11 +851,11 @@ local.tee $0 i32.load i32.const 3 - i32.shr_u + i32.shr_s local.get $0 i32.load offset=4 i32.const 3 - i32.shr_u + i32.shr_s call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/sres global.get $std/operator-overloading/sres @@ -887,11 +887,11 @@ local.tee $0 i32.load i32.const 3 - i32.shr_s + i32.shr_u local.get $0 i32.load offset=4 i32.const 3 - i32.shr_s + i32.shr_u call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/ures global.get $std/operator-overloading/ures diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 81ad16530e..3722cbd445 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -108,7 +108,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -451,7 +451,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -469,7 +469,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -487,7 +487,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -505,7 +505,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -544,7 +544,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -846,11 +846,11 @@ local.get $0 i32.load local.get $1 - i32.shr_u + i32.shr_s local.get $0 i32.load offset=4 local.get $1 - i32.shr_u + i32.shr_s call $std/operator-overloading/Tester#constructor local.set $2 local.get $0 @@ -866,11 +866,11 @@ local.get $0 i32.load local.get $1 - i32.shr_s + i32.shr_u local.get $0 i32.load offset=4 local.get $1 - i32.shr_s + i32.shr_u call $std/operator-overloading/Tester#constructor local.set $2 local.get $0 diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index af5ae64543..7a407a2b77 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -496,7 +496,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -512,7 +512,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -528,7 +528,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -544,7 +544,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -617,7 +617,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -633,7 +633,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -649,7 +649,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -665,7 +665,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -724,7 +724,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -740,7 +740,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -756,7 +756,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -772,7 +772,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/std/polyfills.untouched.wat b/tests/compiler/std/polyfills.untouched.wat index bf89d5f968..966b7ef0aa 100644 --- a/tests/compiler/std/polyfills.untouched.wat +++ b/tests/compiler/std/polyfills.untouched.wat @@ -59,7 +59,7 @@ i32.const 65535 i32.and i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.or @@ -79,9 +79,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.or @@ -155,7 +155,7 @@ drop local.get $0 i64.const 8 - i64.shr_s + i64.shr_u i64.const 71777214294589695 i64.and local.set $1 @@ -171,7 +171,7 @@ local.set $3 local.get $3 i64.const 16 - i64.shr_s + i64.shr_u i64.const 281470681808895 i64.and local.set $1 @@ -208,7 +208,7 @@ drop local.get $0 i64.const 8 - i64.shr_s + i64.shr_u i64.const 71777214294589695 i64.and local.set $1 @@ -224,7 +224,7 @@ local.set $3 local.get $3 i64.const 16 - i64.shr_s + i64.shr_u i64.const 281470681808895 i64.and local.set $1 @@ -352,7 +352,7 @@ i32.const 65535 i32.and i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.or @@ -379,9 +379,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.or @@ -412,7 +412,7 @@ i32.and local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.or @@ -447,7 +447,7 @@ i32.and local.get $0 i32.const 8 - i32.shr_u + i32.shr_s i32.const 255 i32.and i32.or @@ -478,12 +478,12 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 170 i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -514,12 +514,12 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 48042 i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -628,12 +628,12 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 170 i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -664,12 +664,12 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 48042 i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eq i32.eqz if diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 3517835159..efcadc7858 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -86,7 +86,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -97,7 +97,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -387,7 +387,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -398,7 +398,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -714,7 +714,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -741,7 +741,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -973,7 +973,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1358,12 +1358,10 @@ i32.const 0 else local.get $0 - i32.load8_s + i32.load8_u local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.eq end if @@ -1387,7 +1385,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 call $~lib/set/Set#find i32.const 0 @@ -1531,7 +1529,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 local.tee $3 call $~lib/set/Set#find @@ -1907,13 +1905,13 @@ i32.load offset=8 local.tee $5 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 1200 @@ -2184,7 +2182,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 call $~lib/set/Set#find local.tee $1 @@ -2207,7 +2205,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 1 i32.add @@ -2284,9 +2282,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 100 - i32.lt_u + i32.lt_s if local.get $0 local.get $2 @@ -2341,9 +2339,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 100 - i32.lt_u + i32.lt_s if local.get $0 local.get $2 @@ -2450,9 +2448,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 50 - i32.lt_u + i32.lt_s if local.get $0 local.get $1 @@ -2506,9 +2504,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 50 - i32.lt_u + i32.lt_s if local.get $0 local.get $1 @@ -2617,49 +2615,6 @@ i32.store offset=20 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -2667,7 +2622,7 @@ i32.const 255 i32.and call $~lib/util/hash/hash8 - call $~lib/set/Set#find + call $~lib/set/Set#find i32.const 0 i32.ne ) @@ -2810,7 +2765,7 @@ i32.and call $~lib/util/hash/hash8 local.tee $3 - call $~lib/set/Set#find + call $~lib/set/Set#find i32.eqz if local.get $0 @@ -3024,7 +2979,7 @@ i32.const 255 i32.and call $~lib/util/hash/hash8 - call $~lib/set/Set#find + call $~lib/set/Set#find local.tee $1 i32.eqz if @@ -3045,7 +3000,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 1 i32.add @@ -3424,7 +3379,7 @@ i32.mul local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -3452,12 +3407,10 @@ i32.const 0 else local.get $0 - i32.load16_s + i32.load16_u local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.eq end if @@ -3481,7 +3434,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 call $~lib/set/Set#find i32.const 0 @@ -3625,7 +3578,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 local.tee $3 call $~lib/set/Set#find @@ -3898,7 +3851,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 call $~lib/set/Set#find local.tee $1 @@ -3921,7 +3874,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 1 i32.add @@ -3965,9 +3918,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 100 - i32.lt_u + i32.lt_s if local.get $0 local.get $2 @@ -4022,9 +3975,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 100 - i32.lt_u + i32.lt_s if local.get $0 local.get $2 @@ -4131,9 +4084,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 50 - i32.lt_u + i32.lt_s if local.get $0 local.get $1 @@ -4187,9 +4140,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 50 - i32.lt_u + i32.lt_s if local.get $0 local.get $1 @@ -4298,49 +4251,6 @@ i32.store offset=20 local.get $0 ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -4348,7 +4258,7 @@ i32.const 65535 i32.and call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#find i32.const 0 i32.ne ) @@ -4491,7 +4401,7 @@ i32.and call $~lib/util/hash/hash16 local.tee $3 - call $~lib/set/Set#find + call $~lib/set/Set#find i32.eqz if local.get $0 @@ -4711,7 +4621,7 @@ i32.const 65535 i32.and call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#find local.tee $1 i32.eqz if @@ -4732,7 +4642,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 1 i32.add @@ -5111,7 +5021,7 @@ i32.mul local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -5119,7 +5029,7 @@ i32.mul local.get $0 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -5127,7 +5037,7 @@ i32.mul local.get $0 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -5608,7 +5518,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $2 i32.const 1 i32.add @@ -6428,7 +6338,7 @@ i32.mul local.get $1 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -6436,7 +6346,7 @@ i32.mul local.get $1 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -6444,13 +6354,13 @@ i32.mul local.get $1 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul local.get $0 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $1 i32.const 255 @@ -6460,7 +6370,7 @@ i32.mul local.get $1 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -6468,7 +6378,7 @@ i32.mul local.get $1 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -6476,7 +6386,7 @@ i32.mul local.get $1 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -6958,7 +6868,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 i32.const 1 i32.add @@ -8265,7 +8175,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 i32.const 1 i32.add @@ -9092,7 +9002,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 i32.const 1 i32.add diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 602231ec57..b867f31859 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -108,7 +108,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -120,7 +120,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -494,7 +494,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -506,7 +506,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -819,7 +819,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -983,7 +983,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1013,7 +1013,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1203,7 +1203,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1869,7 +1869,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq else i32.const 0 @@ -1911,7 +1911,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.0 end @@ -2103,7 +2103,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.1 end @@ -2223,7 +2223,7 @@ local.get $1 i32.const 1073741808 i32.const 0 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -2585,7 +2585,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2601,7 +2601,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2617,7 +2617,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2633,7 +2633,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2706,7 +2706,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2722,7 +2722,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2738,7 +2738,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2754,7 +2754,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2813,7 +2813,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2829,7 +2829,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2845,7 +2845,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2861,7 +2861,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -3735,13 +3735,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -3971,7 +3971,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash8 br $~lib/util/hash/HASH|inlined.3 end @@ -4000,7 +4000,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -4099,7 +4099,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 100 i32.lt_s local.set $3 @@ -4161,7 +4161,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 100 i32.lt_s local.set $4 @@ -4279,7 +4279,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 50 i32.lt_s local.set $7 @@ -4341,7 +4341,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 50 i32.lt_s local.set $8 @@ -4854,7 +4854,7 @@ local.get $1 i32.const 1073741808 i32.const 0 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -5116,7 +5116,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -5598,7 +5598,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -5636,7 +5636,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eq else i32.const 0 @@ -5682,7 +5682,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.0 end @@ -5882,7 +5882,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.1 end @@ -6002,7 +6002,7 @@ local.get $1 i32.const 1073741808 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -6241,7 +6241,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/hash/hash16 br $~lib/util/hash/HASH|inlined.3 end @@ -6270,7 +6270,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -6369,7 +6369,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 100 i32.lt_s local.set $3 @@ -6431,7 +6431,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 100 i32.lt_s local.set $4 @@ -6549,7 +6549,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 50 i32.lt_s local.set $7 @@ -6611,7 +6611,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 50 i32.lt_s local.set $8 @@ -7136,7 +7136,7 @@ local.get $1 i32.const 1073741808 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -7402,7 +7402,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -7884,7 +7884,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -7894,7 +7894,7 @@ local.get $1 local.get $0 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -7904,7 +7904,7 @@ local.get $1 local.get $0 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -8308,7 +8308,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -8576,7 +8576,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -9428,7 +9428,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -9696,7 +9696,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -10160,7 +10160,7 @@ local.set $1 local.get $0 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 i32.const -2128831035 @@ -10176,7 +10176,7 @@ local.get $3 local.get $1 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -10186,7 +10186,7 @@ local.get $3 local.get $1 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -10196,7 +10196,7 @@ local.get $3 local.get $1 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -10212,7 +10212,7 @@ local.get $3 local.get $2 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -10222,7 +10222,7 @@ local.get $3 local.get $2 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -10232,7 +10232,7 @@ local.get $3 local.get $2 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -10650,7 +10650,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -10923,7 +10923,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -11790,7 +11790,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -12063,7 +12063,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -12897,7 +12897,7 @@ local.get $1 i32.const 1073741808 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -13159,7 +13159,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 @@ -14005,7 +14005,7 @@ local.get $1 i32.const 1073741808 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 192 @@ -14271,7 +14271,7 @@ local.get $0 i32.load offset=4 i32.const 1 - i32.shr_s + i32.shr_u local.set $4 local.get $4 i32.const 1 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index e7002f57aa..5a80874100 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -69,7 +69,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $1 local.get $2 local.get $1 @@ -583,13 +583,13 @@ i32.load offset=8 local.tee $2 local.get $1 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 1 i32.const 1073741808 local.get $1 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 1472 diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 77a86692a2..40be734cf3 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -98,7 +98,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -445,7 +445,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -461,7 +461,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -477,7 +477,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -493,7 +493,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -566,7 +566,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -582,7 +582,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -598,7 +598,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -614,7 +614,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -673,7 +673,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -689,7 +689,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -705,7 +705,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -721,7 +721,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -1783,13 +1783,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 464 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index d216986867..9e5adce441 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -36,7 +36,7 @@ i32.sub i32.load offset=12 i32.const 2 - i32.shr_s + i32.shr_u ) (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -120,7 +120,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -131,7 +131,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -421,7 +421,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -432,7 +432,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -724,7 +724,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -751,7 +751,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -1003,7 +1003,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 diff --git a/tests/compiler/std/staticarray.untouched.wat b/tests/compiler/std/staticarray.untouched.wat index 1194b82480..b74ba95635 100644 --- a/tests/compiler/std/staticarray.untouched.wat +++ b/tests/compiler/std/staticarray.untouched.wat @@ -43,7 +43,7 @@ i32.sub i32.load offset=12 i32.const 2 - i32.shr_s + i32.shr_u ) (func $~lib/staticarray/StaticArray#__uget (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -167,7 +167,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -179,7 +179,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -553,7 +553,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -565,7 +565,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -878,7 +878,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1042,7 +1042,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1072,7 +1072,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1262,7 +1262,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1796,7 +1796,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1812,7 +1812,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1828,7 +1828,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1844,7 +1844,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1917,7 +1917,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1933,7 +1933,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -1949,7 +1949,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1965,7 +1965,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2024,7 +2024,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2040,7 +2040,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2056,7 +2056,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2072,7 +2072,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 186f195b75..362ee9491f 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -314,7 +314,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) @@ -412,7 +412,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -423,7 +423,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -713,7 +713,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -724,7 +724,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -1040,7 +1040,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -1067,7 +1067,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -1299,7 +1299,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1392,7 +1392,7 @@ (local $6 i32) local.get $0 i32.const 8 - i32.shr_s + i32.shr_u local.tee $2 i32.const 5672 i32.add @@ -1423,7 +1423,7 @@ i32.load i32.mul i32.const 11 - i32.shr_s + i32.shr_u i32.const 6 i32.rem_u i32.add @@ -1434,7 +1434,7 @@ i32.load local.tee $2 i32.const 8 - i32.shr_u + i32.shr_s local.set $3 block $folding-inner0 local.get $2 @@ -1450,7 +1450,7 @@ local.set $2 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.set $4 loop $while-continue|0 local.get $2 @@ -1458,7 +1458,7 @@ local.get $5 local.get $2 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 local.get $4 i32.add @@ -1485,7 +1485,7 @@ i32.load local.tee $2 i32.const 8 - i32.shr_u + i32.shr_s local.set $3 local.get $2 i32.const 255 @@ -2019,7 +2019,7 @@ local.get $7 i32.add i32.const 3 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.tee $6 @@ -2037,7 +2037,7 @@ br_if $~lib/util/casemap/bsearch|inlined.0 local.get $5 i32.const 31 - i32.shr_s + i32.shr_u if local.get $6 i32.const 4 @@ -2126,7 +2126,7 @@ i32.shl local.get $2 i32.const 10 - i32.shr_s + i32.shr_u i32.const 55296 i32.or i32.or @@ -2334,7 +2334,7 @@ local.get $0 local.get $1 i32.const 8 - i32.shr_s + i32.shr_u i32.add i32.load8_u i32.const 5 @@ -2350,7 +2350,7 @@ local.get $1 i32.const 7 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and ) @@ -2396,7 +2396,7 @@ local.set $1 local.get $3 i32.const 7 - i32.shr_s + i32.shr_u if block $for-continue|0 local.get $4 @@ -2777,7 +2777,7 @@ i32.sub local.tee $3 i32.const 10 - i32.shr_s + i32.shr_u i32.const 55296 i32.or local.get $3 @@ -2865,7 +2865,7 @@ i32.sub local.tee $0 i32.const 10 - i32.shr_s + i32.shr_u i32.const 55296 i32.or local.get $0 diff --git a/tests/compiler/std/string-casemapping.untouched.wat b/tests/compiler/std/string-casemapping.untouched.wat index ac8b41a037..00768c8b28 100644 --- a/tests/compiler/std/string-casemapping.untouched.wat +++ b/tests/compiler/std/string-casemapping.untouched.wat @@ -216,7 +216,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/rt/pure/increment (param $0 i32) (local $1 i32) @@ -346,7 +346,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -358,7 +358,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -732,7 +732,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -744,7 +744,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1057,7 +1057,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1221,7 +1221,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1251,7 +1251,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1441,7 +1441,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1717,7 +1717,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/casemap/casemap (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1737,7 +1737,7 @@ local.set $2 local.get $0 i32.const 8 - i32.shr_s + i32.shr_u local.set $3 local.get $0 i32.const 255 @@ -1772,7 +1772,7 @@ i32.load i32.mul i32.const 11 - i32.shr_s + i32.shr_u i32.const 6 i32.rem_u local.set $6 @@ -1794,7 +1794,7 @@ local.set $8 local.get $7 i32.const 8 - i32.shr_u + i32.shr_s local.set $9 local.get $8 i32.const 2 @@ -1817,7 +1817,7 @@ local.set $10 local.get $9 i32.const 8 - i32.shr_s + i32.shr_u local.set $11 loop $while-continue|0 local.get $10 @@ -1826,7 +1826,7 @@ if local.get $10 i32.const 1 - i32.shr_s + i32.shr_u local.set $13 i32.const 5304 local.get $11 @@ -1861,7 +1861,7 @@ local.set $8 local.get $7 i32.const 8 - i32.shr_u + i32.shr_s local.set $9 local.get $8 i32.const 2 @@ -2221,7 +2221,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2237,7 +2237,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2253,7 +2253,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2269,7 +2269,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2342,7 +2342,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2358,7 +2358,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2374,7 +2374,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2390,7 +2390,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2449,7 +2449,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2465,7 +2465,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2481,7 +2481,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2497,7 +2497,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -3423,7 +3423,7 @@ local.set $9 local.get $9 i32.const 7 - i32.shr_s + i32.shr_u i32.eqz if local.get $2 @@ -3567,7 +3567,7 @@ local.get $10 i32.add i32.const 3 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.set $15 @@ -3589,7 +3589,7 @@ else local.get $16 i32.const 31 - i32.shr_s + i32.shr_u if local.get $15 i32.const 4 @@ -3674,7 +3674,7 @@ local.set $12 local.get $12 i32.const 10 - i32.shr_s + i32.shr_u i32.const 55296 i32.or local.set $13 @@ -3939,7 +3939,7 @@ local.get $0 local.get $1 i32.const 8 - i32.shr_s + i32.shr_u i32.add i32.load8_u i32.const 5 @@ -3949,13 +3949,13 @@ i32.const 255 i32.and i32.const 3 - i32.shr_s + i32.shr_u i32.add i32.load8_u local.get $1 i32.const 7 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and ) @@ -4019,7 +4019,7 @@ local.set $7 local.get $7 i32.const 7 - i32.shr_s + i32.shr_u i32.eqz if local.get $2 @@ -4466,7 +4466,7 @@ local.set $7 local.get $7 i32.const 10 - i32.shr_s + i32.shr_u i32.const 55296 i32.or local.set $14 @@ -4563,7 +4563,7 @@ local.set $3 local.get $0 i32.const 10 - i32.shr_s + i32.shr_u i32.const 55296 i32.or local.set $4 @@ -5052,7 +5052,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -5197,7 +5197,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -5351,7 +5351,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $4 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 71b9ee3749..47d0c5f5b2 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -153,7 +153,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -164,7 +164,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -454,7 +454,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -465,7 +465,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -781,7 +781,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -808,7 +808,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -1040,7 +1040,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1131,7 +1131,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -2658,7 +2658,7 @@ i32.sub local.tee $3 i32.const 10 - i32.shr_s + i32.shr_u i32.const 55296 i32.or local.get $3 diff --git a/tests/compiler/std/string-encoding.untouched.wat b/tests/compiler/std/string-encoding.untouched.wat index b8e73dd0d2..1fe5cf554d 100644 --- a/tests/compiler/std/string-encoding.untouched.wat +++ b/tests/compiler/std/string-encoding.untouched.wat @@ -211,7 +211,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -223,7 +223,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -597,7 +597,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -609,7 +609,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -922,7 +922,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1086,7 +1086,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1116,7 +1116,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1306,7 +1306,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -1582,7 +1582,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1848,7 +1848,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1864,7 +1864,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1880,7 +1880,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1896,7 +1896,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1969,7 +1969,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1985,7 +1985,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2001,7 +2001,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2017,7 +2017,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2076,7 +2076,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2092,7 +2092,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2108,7 +2108,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2124,7 +2124,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -3651,7 +3651,7 @@ if local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 192 i32.or local.set $8 @@ -3711,13 +3711,13 @@ local.set $7 local.get $7 i32.const 18 - i32.shr_s + i32.shr_u i32.const 240 i32.or local.set $8 local.get $7 i32.const 12 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -3725,7 +3725,7 @@ local.set $10 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -3765,13 +3765,13 @@ end local.get $7 i32.const 12 - i32.shr_s + i32.shr_u i32.const 224 i32.or local.set $9 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -4545,7 +4545,7 @@ local.set $8 local.get $8 i32.const 10 - i32.shr_s + i32.shr_u i32.const 55296 i32.or local.set $11 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 602bc6fc80..9d5f4b26f1 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -534,7 +534,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -740,7 +740,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -751,7 +751,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -1041,7 +1041,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -1052,7 +1052,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -1368,7 +1368,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -1395,7 +1395,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -1627,7 +1627,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1785,7 +1785,7 @@ i32.sub local.tee $0 i32.const 10 - i32.shr_s + i32.shr_u i32.const 55296 i32.or local.get $0 @@ -3342,7 +3342,7 @@ local.set $2 local.get $0 i32.const 1 - i32.shr_s + i32.shr_u local.set $0 local.get $1 local.get $1 @@ -3921,7 +3921,7 @@ if (result i32) local.get $0 i32.const 31 - i32.shr_u + i32.shr_s local.tee $2 local.get $0 local.get $2 @@ -4052,7 +4052,7 @@ local.get $14 i64.ctz local.tee $12 - i64.shr_s + i64.shr_u local.set $14 local.get $12 local.get $0 @@ -4068,7 +4068,7 @@ i64.const 32 local.get $14 i64.const 32 - i64.shr_s + i64.shr_u i64.const 1220703125 i64.mul local.get $14 @@ -4082,7 +4082,7 @@ i64.add local.tee $12 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.clz local.tee $0 @@ -4097,7 +4097,7 @@ i64.extend_i32_u i64.shl i64.const 31 - i64.shr_s + i64.shr_u i64.const 1 i64.and local.get $12 @@ -4108,7 +4108,7 @@ i64.const 4294967295 i64.and local.get $11 - i64.shr_s + i64.shr_u i64.or i64.add local.set $14 @@ -4133,15 +4133,15 @@ i64.extend_i32_u local.get $14 i64.const 32 - i64.shr_s + i64.shr_u i64.mul local.get $12 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $14 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 i32.clz local.tee $0 @@ -4156,7 +4156,7 @@ i64.extend_i32_u i64.shl i64.const 31 - i64.shr_s + i64.shr_u i64.const 1 i64.and local.get $14 @@ -4167,7 +4167,7 @@ i64.const 4294967295 i64.and local.get $11 - i64.shr_s + i64.shr_u i64.or i64.add f64.convert_i64_u @@ -5509,7 +5509,7 @@ i32.load offset=8 local.tee $4 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 @@ -5924,7 +5924,7 @@ i32.store16 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.tee $1 br_if $do-continue|0 end @@ -6070,7 +6070,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.tee $1 i64.const 0 i64.ne @@ -6106,7 +6106,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $2 if i32.const 0 @@ -6142,7 +6142,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add i32.add @@ -6234,7 +6234,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.tee $1 @@ -6370,7 +6370,7 @@ i64.store16 local.get $1 i64.const 4 - i64.shr_s + i64.shr_u local.tee $1 i64.const 0 i64.ne @@ -6447,7 +6447,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.tee $1 @@ -6506,7 +6506,7 @@ end local.get $0 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 if @@ -6565,7 +6565,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add i32.add @@ -6634,7 +6634,7 @@ local.get $3 local.get $11 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -6881,7 +6881,7 @@ i64.mul local.tee $3 local.get $13 - i64.shr_s + i64.shr_u local.tee $1 local.get $6 i64.extend_i32_s @@ -7337,7 +7337,7 @@ f64.ne i32.add i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.tee $4 @@ -7365,12 +7365,12 @@ local.set $2 local.get $6 i64.const 32 - i64.shr_s + i64.shr_u local.tee $6 global.get $~lib/util/number/_frc_plus local.tee $5 i64.const 32 - i64.shr_s + i64.shr_u local.tee $7 i64.mul local.get $2 @@ -7383,11 +7383,11 @@ local.tee $5 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $5 local.get $6 @@ -7399,7 +7399,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.sub @@ -7420,7 +7420,7 @@ i64.shl local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u local.tee $7 i64.mul local.get $2 @@ -7433,11 +7433,11 @@ local.tee $3 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $3 local.get $6 @@ -7449,7 +7449,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add global.get $~lib/util/number/_exp_pow local.tee $4 @@ -7470,7 +7470,7 @@ global.get $~lib/util/number/_frc_minus local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u local.tee $5 i64.mul local.get $2 @@ -7483,11 +7483,11 @@ local.tee $2 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $2 local.get $6 @@ -7499,7 +7499,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.add @@ -9245,7 +9245,7 @@ call $~lib/string/parseInt i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.eqz if i32.const 0 diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 7febfaf019..55ead31450 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -571,7 +571,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -871,7 +871,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -883,7 +883,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1257,7 +1257,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -1269,7 +1269,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1582,7 +1582,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1746,7 +1746,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1776,7 +1776,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1966,7 +1966,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -2325,7 +2325,7 @@ local.set $3 local.get $0 i32.const 10 - i32.shr_s + i32.shr_u i32.const 55296 i32.or local.set $4 @@ -2851,7 +2851,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2867,7 +2867,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2883,7 +2883,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2899,7 +2899,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2972,7 +2972,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2988,7 +2988,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -3004,7 +3004,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -3020,7 +3020,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -3079,7 +3079,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -3095,7 +3095,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -3111,7 +3111,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -3127,7 +3127,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -5697,7 +5697,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -5715,7 +5715,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -5733,7 +5733,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -5751,7 +5751,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -5790,7 +5790,7 @@ end local.get $1 i32.const 1 - i32.shr_s + i32.shr_u local.set $1 local.get $0 local.get $0 @@ -6535,7 +6535,7 @@ local.get $17 local.tee $16 i32.const 31 - i32.shr_u + i32.shr_s local.tee $15 local.get $16 i32.add @@ -6696,7 +6696,7 @@ local.set $24 local.get $19 local.get $24 - i64.shr_s + i64.shr_u local.set $19 local.get $24 local.get $14 @@ -6725,18 +6725,18 @@ local.set $21 local.get $20 i64.const 32 - i64.shr_s + i64.shr_u local.get $15 i64.extend_i32_u i64.mul local.get $21 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $22 local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $6 local.get $6 @@ -6759,14 +6759,14 @@ i64.const 4294967295 i64.and local.get $23 - i64.shr_s + i64.shr_u i64.or local.get $21 local.get $12 i64.extend_i32_u i64.shl i64.const 31 - i64.shr_s + i64.shr_u i64.const 1 i64.and i64.add @@ -6793,18 +6793,18 @@ local.set $23 local.get $20 i64.const 32 - i64.shr_s + i64.shr_u local.get $16 i64.extend_i32_u i64.mul local.get $23 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $22 local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $13 local.get $13 @@ -6827,14 +6827,14 @@ i64.const 4294967295 i64.and local.get $21 - i64.shr_s + i64.shr_u i64.or local.get $23 local.get $12 i64.extend_i32_u i64.shl i64.const 31 - i64.shr_s + i64.shr_u i64.const 1 i64.and i64.add @@ -8515,13 +8515,13 @@ local.get $1 local.get $3 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 11392 @@ -9186,7 +9186,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -9331,7 +9331,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -9411,7 +9411,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $2 if @@ -9461,7 +9461,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -9590,7 +9590,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $3 @@ -9927,7 +9927,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $4 @@ -10009,7 +10009,7 @@ end local.get $0 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 local.get $2 @@ -10096,7 +10096,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -10193,7 +10193,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $11 local.get $3 @@ -10514,7 +10514,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u local.set $22 local.get $22 local.get $14 @@ -11030,7 +11030,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $7 local.get $6 @@ -11129,7 +11129,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $14 @@ -11184,11 +11184,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -11199,7 +11199,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -11216,11 +11216,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $24 i64.const 32 - i64.shr_s + i64.shr_u local.set $24 local.get $20 local.get $21 @@ -11254,11 +11254,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $23 local.get $22 @@ -11269,7 +11269,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $18 local.get $23 @@ -11286,11 +11286,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_s + i64.shr_u local.set $18 local.get $25 i64.const 32 - i64.shr_s + i64.shr_u local.set $25 local.get $21 local.get $20 @@ -11326,11 +11326,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -11341,7 +11341,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -11358,11 +11358,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $27 i64.const 32 - i64.shr_s + i64.shr_u local.set $27 local.get $20 local.get $21 @@ -13146,7 +13146,7 @@ local.get $32 i64.reinterpret_f64 i64.const 63 - i64.shr_s + i64.shr_u i64.const 0 i64.ne i32.const 0 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 331fba1f1b..35c2d5f686 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -110,7 +110,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $3 local.get $5 local.get $3 @@ -333,7 +333,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/hash/hashStr (param $0 i32) (result i32) (local $1 i32) @@ -725,7 +725,7 @@ i32.mul local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -733,7 +733,7 @@ i32.mul local.get $0 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -741,7 +741,7 @@ i32.mul local.get $0 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 5cd3ccc218..a5bff270c4 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -114,7 +114,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -525,7 +525,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/hash/hashStr (param $0 i32) (result i32) (local $1 i32) @@ -1210,7 +1210,7 @@ local.get $1 local.get $0 i32.const 8 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -1220,7 +1220,7 @@ local.get $1 local.get $0 i32.const 16 - i32.shr_s + i32.shr_u i32.const 255 i32.and i32.xor @@ -1230,7 +1230,7 @@ local.get $1 local.get $0 i32.const 24 - i32.shr_s + i32.shr_u i32.xor i32.const 16777619 i32.mul @@ -2033,7 +2033,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2049,7 +2049,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2065,7 +2065,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -2081,7 +2081,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -2154,7 +2154,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2170,7 +2170,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2186,7 +2186,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -2202,7 +2202,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -2261,7 +2261,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2277,7 +2277,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2293,7 +2293,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -2309,7 +2309,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 56af175251..dad96f2d68 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -314,7 +314,7 @@ (data (i32.const 12464) "\n\00\00\00\01\00\00\00\00\00\00\00\n\00\00\00\00\ff\00\00\00d\n\ff\ff") (data (i32.const 12496) "\n\00\00\00\01\00\00\00\00\00\00\00\n\00\00\00\01\ffd\ff\00\00d\n\ff") (table $0 123 funcref) - (elem (i32.const 1) $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 1) $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) @@ -385,7 +385,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -396,7 +396,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -686,7 +686,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -697,7 +697,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -1013,7 +1013,7 @@ if local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $1 else i32.const 31 @@ -1040,7 +1040,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $1 @@ -1272,7 +1272,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $5 local.get $3 local.get $5 @@ -1605,7 +1605,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 1040 @@ -1906,7 +1906,7 @@ local.get $4 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -1946,7 +1946,7 @@ local.get $5 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -1986,7 +1986,7 @@ local.get $6 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -2026,7 +2026,7 @@ local.get $7 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -2066,7 +2066,7 @@ local.get $8 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -2106,7 +2106,7 @@ local.get $9 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -2146,7 +2146,7 @@ local.get $10 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -2186,7 +2186,7 @@ local.get $11 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -2224,7 +2224,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -2248,7 +2248,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -2274,7 +2274,7 @@ local.tee $4 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $3 local.get $1 i32.const 0 @@ -2358,7 +2358,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -2385,7 +2385,7 @@ local.tee $4 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $3 local.get $1 i32.const 0 @@ -2618,7 +2618,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.tee $2 @@ -2646,24 +2646,24 @@ local.get $5 local.get $2 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $2 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq if local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.set $2 br $while-continue|1 end @@ -2671,7 +2671,7 @@ local.get $0 local.get $2 i32.const 1 - i32.shr_u + i32.shr_s local.tee $2 i32.const 3 i32.shl @@ -2698,7 +2698,7 @@ local.get $5 local.get $3 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -2764,7 +2764,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -2772,7 +2772,7 @@ local.get $1 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and local.get $1 @@ -2816,7 +2816,7 @@ local.get $5 local.get $1 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -2843,7 +2843,7 @@ end local.get $1 i32.const 1 - i32.shr_u + i32.shr_s local.set $1 br $while-continue|4 end @@ -2892,10 +2892,10 @@ local.get $2 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $0 i32.const 1 - i32.le_s + i32.le_u br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $2 i32.load offset=4 @@ -2963,7 +2963,7 @@ local.tee $2 local.get $2 i64.const 63 - i64.shr_u + i64.shr_s i64.const 1 i64.shr_u i64.xor @@ -2973,7 +2973,7 @@ local.tee $3 local.get $3 i64.const 63 - i64.shr_u + i64.shr_s i64.const 1 i64.shr_u i64.xor @@ -2989,7 +2989,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -3029,11 +3029,11 @@ local.get $2 i32.sub i32.const 31 - i32.shr_u + i32.shr_s i32.or local.get $2 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor i32.and @@ -3546,7 +3546,7 @@ local.get $5 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $1 local.get $2 i32.const 0 @@ -3653,13 +3653,13 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $3 loop $for-loop|0 local.get $2 @@ -3702,7 +3702,7 @@ local.tee $4 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $3 local.get $1 i32.const 0 @@ -3787,7 +3787,7 @@ local.tee $5 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $4 local.get $3 local.get $4 @@ -3972,7 +3972,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -3996,7 +3996,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -4037,7 +4037,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -4081,7 +4081,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -4105,7 +4105,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -4151,7 +4151,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -4195,7 +4195,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -4219,7 +4219,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -4327,7 +4327,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -4389,7 +4389,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -4701,7 +4701,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $0 local.get $1 i32.load offset=4 @@ -4773,7 +4773,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -4810,7 +4810,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $0 local.get $1 i32.load offset=4 @@ -4882,7 +4882,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -4919,7 +4919,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $0 local.get $1 i32.load offset=4 @@ -5005,7 +5005,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $0 local.get $1 i32.load offset=4 @@ -5077,7 +5077,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -5119,7 +5119,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $0 local.get $1 i32.load offset=4 @@ -5191,7 +5191,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -5228,7 +5228,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $0 local.get $1 i32.load offset=4 @@ -5300,7 +5300,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -5342,7 +5342,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $0 local.get $1 i32.load offset=4 @@ -5414,7 +5414,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 1376 @@ -5456,7 +5456,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $0 local.get $1 i32.load offset=4 @@ -5528,9 +5528,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 2 - i32.gt_u + i32.gt_s ) (func $~lib/rt/tlsf/reallocateBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -6211,9 +6211,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 2 - i32.gt_u + i32.gt_s ) (func $~lib/typedarray/Int16Array#filter (param $0 i32) (result i32) (local $1 i32) @@ -6233,7 +6233,7 @@ local.get $3 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $0 i32.const 12 i32.const 6 @@ -6356,7 +6356,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -6438,7 +6438,7 @@ local.get $3 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $0 i32.const 12 i32.const 7 @@ -6561,7 +6561,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -6641,7 +6641,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $0 i32.const 12 i32.const 8 @@ -6764,7 +6764,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -6844,7 +6844,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $0 i32.const 12 i32.const 9 @@ -6967,7 +6967,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -7047,7 +7047,7 @@ local.get $3 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $0 i32.const 12 i32.const 10 @@ -7170,7 +7170,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -7250,7 +7250,7 @@ local.get $3 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $0 i32.const 12 i32.const 11 @@ -7373,7 +7373,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -7453,7 +7453,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $0 i32.const 12 i32.const 12 @@ -7576,7 +7576,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -7656,7 +7656,7 @@ local.get $3 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $0 i32.const 12 i32.const 13 @@ -7779,7 +7779,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -7838,10 +7838,8 @@ ) (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.const 2 i32.eq ) @@ -7908,19 +7906,10 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u - i32.eqz - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and - i32.const 2 - i32.eq + i32.eqz ) (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7984,18 +7973,10 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.eqz - ) (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 2 i32.eq ) @@ -8021,7 +8002,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -8066,19 +8047,10 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u - i32.eqz - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and - i32.const 2 - i32.eq + i32.eqz ) (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8102,7 +8074,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -8146,12 +8118,6 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 65535 - i32.and - i32.eqz - ) (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 @@ -8179,7 +8145,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -8254,7 +8220,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -8329,7 +8295,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -8405,7 +8371,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -8519,10 +8485,8 @@ ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.const 4 i32.eq ) @@ -8589,13 +8553,6 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const 4 - i32.eq - ) (func $~lib/typedarray/Int16Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -8617,7 +8574,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 loop $for-loop|0 @@ -8665,10 +8622,8 @@ ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 4 i32.eq ) @@ -8693,7 +8648,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 loop $for-loop|0 @@ -8739,13 +8694,6 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 65535 - i32.and - i32.const 4 - i32.eq - ) (func $~lib/typedarray/Int32Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -8767,7 +8715,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 loop $for-loop|0 @@ -8839,7 +8787,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 loop $for-loop|0 @@ -8911,7 +8859,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 loop $for-loop|0 @@ -8983,7 +8931,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $5 block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 loop $for-loop|0 @@ -9035,14 +8983,19 @@ f64.eq ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + call $~lib/rt/pure/__retain local.get $0 i32.const 24 i32.shl i32.const 24 - i32.shr_u - i32.const 1 - i32.and + i32.shr_s + i32.const 2 + i32.rem_s i32.eqz + local.set $0 + call $~lib/rt/pure/__release + local.get $0 ) (func $~lib/typedarray/Int8Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -9177,14 +9130,19 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + call $~lib/rt/pure/__retain local.get $0 i32.const 16 i32.shl i32.const 16 - i32.shr_u - i32.const 1 - i32.and + i32.shr_s + i32.const 2 + i32.rem_s i32.eqz + local.set $0 + call $~lib/rt/pure/__release + local.get $0 ) (func $~lib/typedarray/Int16Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -9208,7 +9166,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -9275,7 +9233,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -9353,7 +9311,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -9431,7 +9389,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -9495,7 +9453,7 @@ local.set $4 local.get $1 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.tee $2 @@ -9528,6 +9486,8 @@ local.get $2 if (result i32) local.get $1 + i32.const 8388607 + i32.and i32.const 8388608 i32.or else @@ -9550,15 +9510,15 @@ i32.gt_s if local.get $1 - i32.const 1082130432 + i32.const 8388608 i32.ge_u if (result i32) local.get $1 - i32.const 1082130432 + i32.const 8388608 i32.eq br_if $folding-inner0 local.get $1 - i32.const 1082130432 + i32.const 8388608 i32.sub else local.get $1 @@ -9574,15 +9534,15 @@ end end local.get $1 - i32.const 1082130432 + i32.const 8388608 i32.ge_u if local.get $1 - i32.const 1082130432 + i32.const 8388608 i32.eq br_if $folding-inner0 local.get $1 - i32.const 1082130432 + i32.const 8388608 i32.sub local.set $1 end @@ -9613,7 +9573,7 @@ i32.const 1 local.get $2 i32.sub - i32.shr_s + i32.shr_u end local.get $4 i32.or @@ -9657,7 +9617,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -9711,11 +9671,11 @@ i64.reinterpret_f64 local.tee $1 i64.const 63 - i64.shr_s + i64.shr_u local.set $4 local.get $1 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.tee $2 @@ -9763,6 +9723,8 @@ i64.shl else local.get $1 + i64.const 4503599627370495 + i64.and i64.const 4503599627370496 i64.or end @@ -9773,15 +9735,15 @@ i64.gt_s if local.get $1 - i64.const 4616189618054758400 + i64.const 4503599627370496 i64.ge_u if (result i64) local.get $1 - i64.const 4616189618054758400 + i64.const 4503599627370496 i64.eq br_if $folding-inner0 local.get $1 - i64.const 4616189618054758400 + i64.const 4503599627370496 i64.sub else local.get $1 @@ -9797,15 +9759,15 @@ end end local.get $1 - i64.const 4616189618054758400 + i64.const 4503599627370496 i64.ge_u if local.get $1 - i64.const 4616189618054758400 + i64.const 4503599627370496 i64.eq br_if $folding-inner0 local.get $1 - i64.const 4616189618054758400 + i64.const 4503599627370496 i64.sub local.set $1 end @@ -9838,7 +9800,7 @@ i64.sub i64.const 1 i64.add - i64.shr_s + i64.shr_u end local.get $4 i64.const 63 @@ -9884,7 +9846,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -9934,17 +9896,13 @@ call $~lib/rt/pure/__retain local.set $2 local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.const 6256 local.get $1 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.ne if i32.const 0 @@ -9983,17 +9941,68 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $3 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + local.set $5 + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $2 + local.get $4 + i32.add + i32.load8_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $3 + i32.load + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/rt/pure/__retain local.set $2 local.get $0 - i32.const 255 + i32.const 65535 i32.and i32.const 6256 local.get $1 call $~lib/array/Array#__get - i32.const 255 + i32.const 65535 i32.and i32.ne if @@ -10033,7 +10042,53 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6256 + local.get $1 + call $~lib/array/Array#__get + local.get $0 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + local.get $2 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int32Array#forEach (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10053,16 +10108,20 @@ local.set $4 local.get $0 i32.load offset=8 + i32.const 2 + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 local.get $5 i32.lt_s if - local.get $2 local.get $4 + local.get $2 + i32.const 2 + i32.shl i32.add - i32.load8_u + i32.load i32.const 3 global.set $~argumentsLength local.get $2 @@ -10084,23 +10143,16 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) local.get $2 call $~lib/rt/pure/__retain local.set $2 local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u i32.const 6256 local.get $1 call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u - i32.ne + i64.extend_i32_s + i64.ne if i32.const 0 i32.const 1312 @@ -10138,19 +10190,71 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int64Array#forEach (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $3 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $5 + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $4 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $3 + i32.load + call_indirect (type $i64_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/rt/pure/__retain local.set $2 local.get $0 - i32.const 65535 - i32.and i32.const 6256 local.get $1 call $~lib/array/Array#__get - i32.const 65535 - i32.and - i32.ne + f32.convert_i32_s + f32.ne if i32.const 0 i32.const 1312 @@ -10188,266 +10292,16 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) local.get $2 call $~lib/rt/pure/__retain local.set $2 + local.get $0 i32.const 6256 local.get $1 call $~lib/array/Array#__get - local.get $0 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - local.get $2 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int32Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_s - local.set $5 - loop $for-loop|0 - local.get $2 - local.get $5 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $3 - i32.load - call_indirect (type $i32_i32_i32_=>_none) - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $0 - i32.const 6256 - local.get $1 - call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - local.get $2 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_s - local.set $5 - loop $for-loop|0 - local.get $2 - local.get $5 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $3 - i32.load - call_indirect (type $i64_i32_i32_=>_none) - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $0 - i32.const 6256 - local.get $1 - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - local.get $2 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $0 - i32.const 6256 - local.get $1 - call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne + f64.convert_i32_s + f64.ne if i32.const 0 i32.const 1312 @@ -10567,7 +10421,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $3 local.get $0 @@ -10577,7 +10431,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 @@ -10609,7 +10463,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -11207,7 +11061,7 @@ local.get $3 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -11258,7 +11112,7 @@ local.tee $3 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.tee $0 i32.const 4 local.get $0 @@ -11352,7 +11206,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $3 local.get $0 @@ -11362,7 +11216,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 @@ -11394,7 +11248,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.ne if i32.const 0 @@ -11497,7 +11351,7 @@ local.get $3 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -11548,7 +11402,7 @@ local.tee $3 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.tee $0 i32.const 4 local.get $0 @@ -11781,7 +11635,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -11984,7 +11838,7 @@ local.tee $3 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $0 i32.const 4 local.get $0 @@ -12211,7 +12065,7 @@ local.get $3 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -12262,7 +12116,7 @@ local.tee $3 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $0 i32.const 4 local.get $0 @@ -12487,7 +12341,7 @@ local.tee $3 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $0 i32.const 4 local.get $0 @@ -12717,7 +12571,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -12768,7 +12622,7 @@ local.tee $3 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $0 i32.const 4 local.get $0 @@ -12998,7 +12852,7 @@ local.get $3 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -13242,12 +13096,10 @@ local.get $2 local.get $4 i32.add - i32.load8_s + i32.load8_u local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.eq if local.get $0 @@ -13311,12 +13163,10 @@ local.get $2 local.get $3 i32.add - i32.load8_s + i32.load8_u local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.eq if local.get $0 @@ -13385,7 +13235,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 1 @@ -13783,165 +13633,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 - local.get $2 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - i32.load offset=8 - local.tee $3 - i32.ge_s - i32.const 1 - local.get $3 - select - if - local.get $0 - call $~lib/rt/pure/__release - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $4 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $4 - i32.add - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - if - local.get $0 - call $~lib/rt/pure/__release - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - local.get $0 - call $~lib/rt/pure/__release - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Uint8Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - i32.load offset=8 - local.tee $3 - i32.eqz - if - local.get $0 - call $~lib/rt/pure/__release - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $3 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $2 - local.get $3 - i32.add - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - if - local.get $0 - call $~lib/rt/pure/__release - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - call $~lib/rt/pure/__release - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Uint8Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/Uint8Array#lastIndexOf - ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (local $0 i32) (local $1 i32) @@ -13979,7 +13670,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -13991,7 +13682,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14005,7 +13696,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14019,7 +13710,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -14033,7 +13724,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -14047,7 +13738,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -14061,7 +13752,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14075,7 +13766,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14089,7 +13780,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -14104,7 +13795,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Uint8Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -14117,7 +13808,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Uint8Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -14132,7 +13823,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Uint8Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -14147,7 +13838,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Uint8Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -14161,7 +13852,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -14175,7 +13866,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -14189,7 +13880,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -14203,7 +13894,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -14217,7 +13908,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -14231,7 +13922,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -14248,7 +13939,7 @@ local.tee $1 i32.const 3 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14262,7 +13953,7 @@ local.get $1 i32.const 4 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -14274,7 +13965,7 @@ local.get $1 i32.const 5 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -14288,7 +13979,7 @@ local.get $1 i32.const 9 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14302,7 +13993,7 @@ local.get $1 i32.const 10 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14316,7 +14007,7 @@ local.get $1 i32.const 11 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14330,7 +14021,7 @@ local.get $1 i32.const 5 i32.const 1 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -14344,7 +14035,7 @@ local.get $1 i32.const 5 i32.const 2 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14401,7 +14092,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -14413,7 +14104,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14427,7 +14118,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14441,7 +14132,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -14455,7 +14146,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -14469,7 +14160,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -14483,7 +14174,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14497,7 +14188,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14511,7 +14202,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -14526,7 +14217,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Uint8Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -14539,7 +14230,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Uint8Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -14554,7 +14245,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Uint8Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -14569,7 +14260,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Uint8Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -14583,7 +14274,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -14597,7 +14288,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -14611,7 +14302,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -14625,7 +14316,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -14639,7 +14330,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -14653,7 +14344,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Uint8Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -14670,7 +14361,7 @@ local.tee $1 i32.const 3 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14684,7 +14375,7 @@ local.get $1 i32.const 4 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -14696,7 +14387,7 @@ local.get $1 i32.const 5 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -14710,7 +14401,7 @@ local.get $1 i32.const 9 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14724,7 +14415,7 @@ local.get $1 i32.const 10 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14738,7 +14429,7 @@ local.get $1 i32.const 11 i32.const 0 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14752,7 +14443,7 @@ local.get $1 i32.const 5 i32.const 1 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -14766,7 +14457,7 @@ local.get $1 i32.const 5 i32.const 2 - call $~lib/typedarray/Uint8Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -14796,7 +14487,7 @@ local.tee $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 i32.ge_s i32.const 1 @@ -14837,12 +14528,10 @@ i32.const 1 i32.shl i32.add - i32.load16_s + i32.load16_u local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.eq if local.get $0 @@ -14871,7 +14560,7 @@ local.tee $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 i32.eqz if @@ -14910,12 +14599,10 @@ i32.const 1 i32.shl i32.add - i32.load16_s + i32.load16_u local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.eq if local.get $0 @@ -14951,7 +14638,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $2 end local.get $0 @@ -14986,7 +14673,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 1 @@ -15383,175 +15070,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - local.get $2 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - i32.load offset=8 - i32.const 1 - i32.shr_s - local.tee $3 - i32.ge_s - i32.const 1 - local.get $3 - select - if - local.get $0 - call $~lib/rt/pure/__release - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $4 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - if - local.get $0 - call $~lib/rt/pure/__release - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - local.get $0 - call $~lib/rt/pure/__release - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Uint16Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - i32.load offset=8 - i32.const 1 - i32.shr_s - local.tee $3 - i32.eqz - if - local.get $0 - call $~lib/rt/pure/__release - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $3 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - if - local.get $0 - call $~lib/rt/pure/__release - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - local.get $0 - call $~lib/rt/pure/__release - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Uint16Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_s - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/Uint16Array#lastIndexOf - ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (local $0 i32) (local $1 i32) @@ -15589,7 +15107,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf if i32.const 0 i32.const 1312 @@ -15601,7 +15119,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15615,7 +15133,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15629,7 +15147,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -15643,7 +15161,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -15657,7 +15175,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -15671,7 +15189,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15685,7 +15203,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15699,7 +15217,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -15714,7 +15232,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Uint16Array#lastIndexOf@varargs + call $~lib/typedarray/Int16Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -15727,7 +15245,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Uint16Array#lastIndexOf@varargs + call $~lib/typedarray/Int16Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -15742,7 +15260,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Uint16Array#lastIndexOf@varargs + call $~lib/typedarray/Int16Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -15757,7 +15275,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Uint16Array#lastIndexOf@varargs + call $~lib/typedarray/Int16Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -15771,7 +15289,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint16Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 3 i32.ne if @@ -15785,7 +15303,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Uint16Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 3 i32.ne if @@ -15799,7 +15317,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Uint16Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const -1 i32.ne if @@ -15813,7 +15331,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Uint16Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 1 i32.ne if @@ -15827,7 +15345,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Uint16Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 1 i32.ne if @@ -15841,7 +15359,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Uint16Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const -1 i32.ne if @@ -15858,7 +15376,7 @@ local.tee $1 i32.const 3 i32.const 0 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15872,7 +15390,7 @@ local.get $1 i32.const 4 i32.const 0 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf if i32.const 0 i32.const 1312 @@ -15884,7 +15402,7 @@ local.get $1 i32.const 5 i32.const 0 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -15898,7 +15416,7 @@ local.get $1 i32.const 9 i32.const 0 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15912,7 +15430,7 @@ local.get $1 i32.const 10 i32.const 0 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15926,7 +15444,7 @@ local.get $1 i32.const 11 i32.const 0 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15940,7 +15458,7 @@ local.get $1 i32.const 5 i32.const 1 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -15954,7 +15472,7 @@ local.get $1 i32.const 5 i32.const 2 - call $~lib/typedarray/Uint16Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15984,7 +15502,7 @@ local.tee $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $3 i32.ge_s i32.const 1 @@ -16055,7 +15573,7 @@ local.tee $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $3 i32.eqz if @@ -16131,7 +15649,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $2 end local.get $0 @@ -16990,7 +16508,7 @@ local.tee $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $3 i32.ge_s i32.const 1 @@ -17061,7 +16579,7 @@ local.tee $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $3 i32.eqz if @@ -17137,7 +16655,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $2 end local.get $0 @@ -17997,7 +17515,7 @@ local.tee $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $3 i32.ge_s i32.const 1 @@ -18068,7 +17586,7 @@ local.tee $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $3 i32.eqz if @@ -18144,7 +17662,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $2 end local.get $0 @@ -18583,7 +18101,7 @@ local.tee $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $3 i32.ge_s i32.const 1 @@ -18654,7 +18172,7 @@ local.tee $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $3 i32.eqz if @@ -18730,7 +18248,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $2 end local.get $0 @@ -19241,7 +18759,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.tee $1 if i32.const 0 @@ -19277,7 +18795,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/number/itoa_buffered (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -19285,9 +18803,9 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 0 - i32.lt_u + i32.lt_s local.tee $2 if local.get $0 @@ -19302,7 +18820,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 10 i32.lt_u if @@ -19315,7 +18833,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 48 i32.or i32.store16 @@ -19329,7 +18847,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.tee $2 call $~lib/util/number/decimalCount32 i32.add @@ -19869,9 +19387,9 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 0 - i32.lt_u + i32.lt_s local.tee $2 if local.get $0 @@ -19886,7 +19404,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 10 i32.lt_u if @@ -19899,7 +19417,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 48 i32.or i32.store16 @@ -19913,7 +19431,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s local.tee $2 call $~lib/util/number/decimalCount32 i32.add @@ -20053,7 +19571,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -20217,7 +19735,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -20394,7 +19912,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -20549,7 +20067,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -20729,7 +20247,7 @@ drop local.get $3 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $0 if @@ -20882,7 +20400,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -21093,7 +20611,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u call $~lib/util/string/joinIntegerArray i32.const 7168 call $~lib/rt/pure/__release @@ -21127,7 +20645,7 @@ local.get $3 local.get $11 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -21374,7 +20892,7 @@ i64.mul local.tee $3 local.get $13 - i64.shr_s + i64.shr_u local.tee $1 local.get $6 i64.extend_i32_s @@ -21830,7 +21348,7 @@ f64.ne i32.add i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.tee $4 @@ -21858,12 +21376,12 @@ local.set $2 local.get $6 i64.const 32 - i64.shr_s + i64.shr_u local.tee $6 global.get $~lib/util/number/_frc_plus local.tee $5 i64.const 32 - i64.shr_s + i64.shr_u local.tee $7 i64.mul local.get $2 @@ -21876,11 +21394,11 @@ local.tee $5 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $5 local.get $6 @@ -21892,7 +21410,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.sub @@ -21913,7 +21431,7 @@ i64.shl local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u local.tee $7 i64.mul local.get $2 @@ -21926,11 +21444,11 @@ local.tee $3 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $3 local.get $6 @@ -21942,7 +21460,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add global.get $~lib/util/number/_exp_pow local.tee $4 @@ -21963,7 +21481,7 @@ global.get $~lib/util/number/_frc_minus local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u local.tee $5 i64.mul local.get $2 @@ -21976,11 +21494,11 @@ local.tee $2 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $2 local.get $6 @@ -21992,7 +21510,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.add @@ -22262,7 +21780,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u call $~lib/util/string/joinFloatArray i32.const 7168 call $~lib/rt/pure/__release @@ -22396,7 +21914,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u call $~lib/util/string/joinFloatArray i32.const 7168 call $~lib/rt/pure/__release @@ -22628,7 +22146,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 @@ -22981,7 +22499,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 @@ -24287,7 +23805,7 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 6 i32.add local.get $0 @@ -24312,7 +23830,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -24475,7 +23993,7 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 4 i32.add local.get $0 @@ -24500,7 +24018,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -25145,7 +24663,7 @@ i32.load local.tee $3 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor local.get $3 @@ -25153,7 +24671,7 @@ local.get $3 i32.sub i32.const 31 - i32.shr_u + i32.shr_s i32.or i32.and i32.store8 @@ -25353,7 +24871,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.add local.get $1 i32.load offset=8 @@ -25377,7 +24895,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $7 loop $for-loop|0 local.get $3 @@ -25396,7 +24914,7 @@ local.tee $5 i32.wrap_i64 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor i64.extend_i32_s @@ -25406,7 +24924,7 @@ i32.wrap_i64 i32.sub i32.const 31 - i32.shr_u + i32.shr_s i64.extend_i32_s i64.or i64.and @@ -25537,7 +25055,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.add local.get $1 i32.load offset=8 @@ -25561,7 +25079,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $7 loop $for-loop|0 local.get $3 @@ -25579,7 +25097,7 @@ i32.load16_s local.tee $2 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor local.get $2 @@ -25587,7 +25105,7 @@ local.get $2 i32.sub i32.const 31 - i32.shr_u + i32.shr_s i32.or i32.and i32.store8 @@ -25657,7 +25175,7 @@ i32.load8_s local.tee $3 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor local.get $3 @@ -25665,7 +25183,7 @@ local.get $3 i32.sub i32.const 31 - i32.shr_u + i32.shr_s i32.or i32.and i32.store8 @@ -25877,7 +25395,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -25950,7 +25468,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -26027,7 +25545,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -26107,13 +25625,13 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 6 i32.add local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -26134,7 +25652,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -26186,7 +25704,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -26268,7 +25786,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -26329,13 +25847,13 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 4 i32.add local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -26379,7 +25897,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -26595,7 +26113,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -26672,7 +26190,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -26754,7 +26272,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -26972,7 +26490,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -27010,7 +26528,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -27088,7 +26606,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -27167,13 +26685,13 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 6 i32.add local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -27194,7 +26712,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -27246,7 +26764,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -27328,7 +26846,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -27393,13 +26911,13 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 4 i32.add local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -27420,7 +26938,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -27471,7 +26989,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -27678,7 +27196,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -27756,7 +27274,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -27837,7 +27355,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -28059,7 +27577,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -28132,7 +27650,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -28209,7 +27727,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -28285,13 +27803,13 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 6 i32.add local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -28337,7 +27855,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -28418,7 +27936,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -28483,13 +28001,13 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 4 i32.add local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -28510,7 +28028,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -28561,7 +28079,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -28768,7 +28286,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -28845,7 +28363,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -28928,7 +28446,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -29156,7 +28674,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -29231,13 +28749,13 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 6 i32.add local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -29258,7 +28776,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -29309,13 +28827,13 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 4 i32.add local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -29336,7 +28854,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -29447,7 +28965,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s br_if $folding-inner0 local.get $1 @@ -29510,7 +29028,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s br_if $folding-inner0 local.get $0 @@ -29564,7 +29082,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s br_if $folding-inner0 local.get $1 @@ -29622,7 +29140,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.gt_s br_if $folding-inner0 local.get $1 @@ -29724,7 +29242,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -29798,13 +29316,13 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 6 i32.add local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -29825,7 +29343,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -29875,13 +29393,13 @@ local.tee $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 4 i32.add local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s if i32.const 1376 @@ -29902,7 +29420,7 @@ local.get $1 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -30013,7 +29531,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s br_if $folding-inner1 local.get $1 @@ -30079,7 +29597,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s br_if $folding-inner1 local.get $1 @@ -30160,7 +29678,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s br_if $folding-inner1 local.get $1 @@ -30218,7 +29736,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.gt_s br_if $folding-inner1 local.get $1 @@ -30315,7 +29833,7 @@ local.tee $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.add local.get $0 @@ -30340,7 +29858,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $7 loop $for-loop|0 local.get $2 @@ -30404,7 +29922,7 @@ local.tee $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 8 i32.add local.get $0 @@ -30429,7 +29947,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $7 loop $for-loop|0 local.get $2 @@ -30447,7 +29965,7 @@ i32.load local.tee $4 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor local.get $4 @@ -30455,7 +29973,7 @@ local.get $4 i32.sub i32.const 31 - i32.shr_u + i32.shr_s i32.or i32.and i32.store8 @@ -30491,7 +30009,7 @@ local.tee $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.get $0 i32.load offset=8 i32.gt_s @@ -30512,7 +30030,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -30601,7 +30119,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -30683,7 +30201,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.ne if @@ -30777,7 +30295,7 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 4 i32.ne if @@ -31313,7 +30831,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -32047,7 +31565,7 @@ local.tee $2 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 3 i32.ne if @@ -32115,7 +31633,7 @@ local.get $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 2 i32.ne if @@ -32168,7 +31686,7 @@ local.get $3 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.ne if @@ -32219,11 +31737,11 @@ local.get $4 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ne if i32.const 0 @@ -32351,10 +31869,8 @@ block $folding-inner3 block $folding-inner2 local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.const 6 i32.ne br_if $folding-inner2 @@ -32450,7 +31966,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 loop $for-loop|00 local.get $0 @@ -32488,10 +32004,8 @@ i32.const 2800 call $~lib/rt/pure/__release local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 6 i32.ne br_if $folding-inner2 @@ -32531,7 +32045,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $8 loop $for-loop|01 local.get $0 @@ -32712,7 +32226,7 @@ local.get $2 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $7 loop $for-loop|02 local.get $0 @@ -32787,7 +32301,7 @@ local.get $2 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $7 loop $for-loop|03 local.get $0 @@ -32898,10 +32412,8 @@ i32.const 3056 call $~lib/rt/pure/__release local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_u + i32.const 255 + i32.and i32.const 6 i32.ne br_if $folding-inner3 @@ -32995,7 +32507,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -33035,10 +32547,8 @@ i32.const 3152 call $~lib/rt/pure/__release local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_u + i32.const 65535 + i32.and i32.const 6 i32.ne br_if $folding-inner3 @@ -33076,7 +32586,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -33260,7 +32770,7 @@ local.get $2 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -33337,7 +32847,7 @@ local.get $2 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -34863,7 +34373,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 @@ -34873,7 +34383,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 @@ -34883,7 +34393,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set i32.const 0 local.set $1 @@ -35038,7 +34548,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 @@ -35048,7 +34558,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 @@ -35058,7 +34568,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set i32.const 0 local.set $1 @@ -35074,7 +34584,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $7 loop $for-loop|010 local.get $1 @@ -35161,7 +34671,7 @@ local.get $2 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u local.set $7 loop $for-loop|011 local.get $1 @@ -35399,7 +34909,7 @@ local.get $2 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.set $7 loop $for-loop|012 local.get $1 @@ -35483,7 +34993,7 @@ local.get $2 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.set $7 loop $for-loop|013 local.get $1 @@ -35575,7 +35085,7 @@ local.tee $1 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u local.tee $3 i32.ge_s i32.const 1 @@ -35664,7 +35174,7 @@ local.tee $1 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u local.tee $4 i32.ge_s i32.const 1 diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index e1630dbc54..09e9e6da94 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -425,7 +425,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -437,7 +437,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -811,7 +811,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -823,7 +823,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1136,7 +1136,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1300,7 +1300,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1330,7 +1330,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1520,7 +1520,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 @@ -2094,7 +2094,7 @@ local.get $1 i32.const 1073741808 local.get $2 - i32.shr_s + i32.shr_u i32.gt_u if i32.const 32 @@ -2231,7 +2231,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/typedarray/Uint16Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2254,7 +2254,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/typedarray/Int32Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2277,7 +2277,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u ) (func $~lib/typedarray/Uint32Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2300,7 +2300,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u ) (func $~lib/typedarray/Int64Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2323,7 +2323,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u ) (func $~lib/typedarray/Uint64Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2346,7 +2346,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u ) (func $~lib/typedarray/Float32Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2369,7 +2369,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u ) (func $~lib/typedarray/Float64Array#constructor (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -2392,7 +2392,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u ) (func $std/typedarray/testInstantiate (param $0 i32) (local $1 i32) @@ -2929,7 +2929,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -2953,7 +2953,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -3083,7 +3083,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -3395,7 +3395,7 @@ i32.const 31 i32.add i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl local.set $3 @@ -3427,17 +3427,17 @@ local.get $4 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add i32.load local.get $7 i32.const 1 - i32.shr_u + i32.shr_s i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.eq @@ -3446,14 +3446,14 @@ if local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $7 br $while-continue|1 end end local.get $7 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 local.get $0 local.get $8 @@ -3482,14 +3482,14 @@ local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $5 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -3561,7 +3561,7 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -3569,7 +3569,7 @@ local.get $8 i32.const 31 i32.and - i32.shr_s + i32.shr_u i32.const 1 i32.and i32.add @@ -3614,14 +3614,14 @@ local.get $4 local.get $8 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add local.get $4 local.get $8 i32.const 5 - i32.shr_s + i32.shr_u i32.const 2 i32.shl i32.add @@ -3646,7 +3646,7 @@ end local.get $8 i32.const 1 - i32.shr_u + i32.shr_s local.set $8 br $while-continue|4 end @@ -3792,17 +3792,17 @@ local.get $2 local.get $2 i64.const 63 - i64.shr_u - i64.const 1 i64.shr_s + i64.const 1 + i64.shr_u i64.xor local.set $2 local.get $3 local.get $3 i64.const 63 - i64.shr_u - i64.const 1 i64.shr_s + i64.const 1 + i64.shr_u i64.xor local.set $3 local.get $2 @@ -3853,7 +3853,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -3890,14 +3890,14 @@ i32.add local.get $2 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor i32.const 255 local.get $2 i32.sub i32.const 31 - i32.shr_u + i32.shr_s local.get $2 i32.or i32.and @@ -4299,7 +4299,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -4315,7 +4315,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -4331,7 +4331,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -4347,7 +4347,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -4420,7 +4420,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -4436,7 +4436,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -4452,7 +4452,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -4468,7 +4468,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -4527,7 +4527,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -4543,7 +4543,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -4559,7 +4559,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -4575,7 +4575,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -6129,7 +6129,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 6 i32.eq i32.eqz @@ -6425,7 +6425,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -6556,7 +6556,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 6 i32.eq i32.eqz @@ -6578,7 +6578,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -6854,7 +6854,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -7003,7 +7003,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -7153,7 +7153,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -7303,7 +7303,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -7685,7 +7685,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 6 i32.eq i32.eqz @@ -8065,7 +8065,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 6 i32.eq i32.eqz @@ -9637,7 +9637,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -9843,7 +9843,7 @@ local.get $0 i32.load offset=8 i32.const 1 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -10232,7 +10232,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -10438,7 +10438,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -10644,7 +10644,7 @@ local.get $0 i32.load offset=8 i32.const 3 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -10850,7 +10850,7 @@ local.get $0 i32.load offset=8 i32.const 2 - i32.shr_s + i32.shr_u i32.ge_u if i32.const 368 @@ -11135,7 +11135,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 2 i32.gt_s local.set $3 @@ -11986,7 +11986,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 2 i32.gt_s local.set $3 @@ -13888,7 +13888,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 2 i32.eq local.set $3 @@ -13981,7 +13981,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 0 i32.eq local.set $3 @@ -14387,7 +14387,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 2 i32.eq local.set $3 @@ -14480,7 +14480,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 0 i32.eq local.set $3 @@ -15687,7 +15687,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 2 i32.eq local.set $3 @@ -15780,7 +15780,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 4 i32.eq local.set $3 @@ -16189,7 +16189,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 2 i32.eq local.set $3 @@ -16282,7 +16282,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 4 i32.eq local.set $3 @@ -17497,7 +17497,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 2 i32.rem_s i32.const 0 @@ -17595,7 +17595,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 2 i32.eq local.set $3 @@ -18011,7 +18011,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 2 i32.rem_s i32.const 0 @@ -18109,7 +18109,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 2 i32.eq local.set $3 @@ -19042,13 +19042,13 @@ local.set $3 local.get $2 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $4 local.get $3 i32.const 23 - i32.shr_s + i32.shr_u i32.const 255 i32.and local.set $5 @@ -19129,7 +19129,7 @@ local.get $2 i32.const -1 i32.const 9 - i32.shr_s + i32.shr_u i32.and local.set $2 local.get $2 @@ -19161,7 +19161,7 @@ local.get $3 i32.const -1 i32.const 9 - i32.shr_s + i32.shr_u i32.and local.set $3 local.get $3 @@ -19261,7 +19261,7 @@ i32.sub i32.const 1 i32.add - i32.shr_s + i32.shr_u local.set $2 end local.get $2 @@ -19469,19 +19469,19 @@ local.set $3 local.get $2 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $4 local.get $3 i64.const 52 - i64.shr_s + i64.shr_u i64.const 2047 i64.and local.set $5 local.get $2 i64.const 63 - i64.shr_s + i64.shr_u local.set $6 local.get $3 i64.const 1 @@ -19558,7 +19558,7 @@ local.get $2 i64.const -1 i64.const 12 - i64.shr_s + i64.shr_u i64.and local.set $2 local.get $2 @@ -19592,7 +19592,7 @@ local.get $3 i64.const -1 i64.const 12 - i64.shr_s + i64.shr_u i64.and local.set $3 local.get $3 @@ -19692,7 +19692,7 @@ i64.sub i64.const 1 i64.add - i64.shr_s + i64.shr_u local.set $2 end local.get $2 @@ -19883,12 +19883,12 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.get $3 i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -20009,7 +20009,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 1 @@ -20019,7 +20019,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 2 @@ -20029,7 +20029,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 5280 @@ -20406,12 +20406,12 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s local.get $3 i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -20532,7 +20532,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 1 @@ -20542,7 +20542,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 2 @@ -20552,7 +20552,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 5376 @@ -21836,7 +21836,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $5 local.get $6 @@ -21846,7 +21846,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $6 i32.const 1 @@ -21880,7 +21880,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -22892,7 +22892,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $5 local.get $6 @@ -22902,7 +22902,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $6 i32.const 1 @@ -22936,7 +22936,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eq i32.eqz if @@ -25320,7 +25320,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq if local.get $6 @@ -25416,7 +25416,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.eq if local.get $6 @@ -25497,7 +25497,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $4 i32.const 1 @@ -27393,7 +27393,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eq if local.get $6 @@ -27489,7 +27489,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.eq if local.get $6 @@ -27570,7 +27570,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $4 i32.const 1 @@ -33254,7 +33254,7 @@ i32.store local.get $1 i64.const 8 - i64.shr_s + i64.shr_u local.set $1 br $while-continue|0 end @@ -33399,7 +33399,7 @@ i32.store16 local.get $1 local.get $5 - i64.shr_s + i64.shr_u local.set $1 local.get $1 i64.const 0 @@ -33479,7 +33479,7 @@ end local.get $0 i32.const 31 - i32.shr_s + i32.shr_u local.set $2 local.get $2 if @@ -33529,7 +33529,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -33595,7 +33595,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/number/itoa_buffered (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -33611,7 +33611,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 0 i32.lt_s local.set $2 @@ -33639,7 +33639,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 10 i32.lt_u if @@ -33652,7 +33652,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s i32.const 48 i32.or i32.store16 @@ -33672,7 +33672,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/util/number/decimalCount32 i32.add local.set $3 @@ -33682,7 +33682,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.set $4 @@ -34322,7 +34322,7 @@ i32.clz i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $3 @@ -34790,7 +34790,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 0 i32.lt_s local.set $2 @@ -34818,7 +34818,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 10 i32.lt_u if @@ -34831,7 +34831,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s i32.const 48 i32.or i32.store16 @@ -34851,7 +34851,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/util/number/decimalCount32 i32.add local.set $3 @@ -34861,7 +34861,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s local.set $5 local.get $3 local.set $4 @@ -36295,7 +36295,7 @@ end local.get $0 i64.const 63 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $2 local.get $2 @@ -36382,7 +36382,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.get $2 @@ -36907,7 +36907,7 @@ i32.wrap_i64 i32.sub i32.const 2 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $4 @@ -37331,7 +37331,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $11 local.get $3 @@ -37652,7 +37652,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u local.set $22 local.get $22 local.get $14 @@ -38168,7 +38168,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $7 local.get $6 @@ -38267,7 +38267,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $14 @@ -38322,11 +38322,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -38337,7 +38337,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -38354,11 +38354,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $24 i64.const 32 - i64.shr_s + i64.shr_u local.set $24 local.get $20 local.get $21 @@ -38392,11 +38392,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $23 local.get $22 @@ -38407,7 +38407,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $18 local.get $23 @@ -38424,11 +38424,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_s + i64.shr_u local.set $18 local.get $25 i64.const 32 - i64.shr_s + i64.shr_u local.set $25 local.get $21 local.get $20 @@ -38464,11 +38464,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -38479,7 +38479,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -38496,11 +38496,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $27 i64.const 32 - i64.shr_s + i64.shr_u local.set $27 local.get $20 local.get $21 @@ -39586,7 +39586,7 @@ i32.const 24 i32.shl i32.const 24 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $4 i32.const 1 @@ -40208,7 +40208,7 @@ i32.const 16 i32.shl i32.const 16 - i32.shr_u + i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $4 i32.const 1 @@ -44497,14 +44497,14 @@ i32.add local.get $11 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor i32.const 255 local.get $11 i32.sub i32.const 31 - i32.shr_u + i32.shr_s local.get $11 i32.or i32.and @@ -44871,7 +44871,7 @@ local.get $11 i32.wrap_i64 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor i64.extend_i32_s @@ -44880,7 +44880,7 @@ i32.wrap_i64 i32.sub i32.const 31 - i32.shr_u + i32.shr_s i64.extend_i32_s local.get $11 i64.or @@ -45240,14 +45240,14 @@ i32.add local.get $11 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor i32.const 255 local.get $11 i32.sub i32.const 31 - i32.shr_u + i32.shr_s local.get $11 i32.or i32.and @@ -45384,14 +45384,14 @@ i32.add local.get $11 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor i32.const 255 local.get $11 i32.sub i32.const 31 - i32.shr_u + i32.shr_s local.get $11 i32.or i32.and @@ -55001,14 +55001,14 @@ i32.add local.get $11 i32.const 31 - i32.shr_u + i32.shr_s i32.const -1 i32.xor i32.const 255 local.get $11 i32.sub i32.const 31 - i32.shr_u + i32.shr_s local.get $11 i32.or i32.and diff --git a/tests/compiler/super-inline.optimized.wat b/tests/compiler/super-inline.optimized.wat index 51c77534b8..3a7a9f164b 100644 --- a/tests/compiler/super-inline.optimized.wat +++ b/tests/compiler/super-inline.optimized.wat @@ -34,7 +34,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 diff --git a/tests/compiler/super-inline.untouched.wat b/tests/compiler/super-inline.untouched.wat index 05164c44fa..798dcad8b1 100644 --- a/tests/compiler/super-inline.untouched.wat +++ b/tests/compiler/super-inline.untouched.wat @@ -38,7 +38,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/throw.untouched.wat b/tests/compiler/throw.untouched.wat index 26f920d200..383394d55d 100644 --- a/tests/compiler/throw.untouched.wat +++ b/tests/compiler/throw.untouched.wat @@ -194,7 +194,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -206,7 +206,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -580,7 +580,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -592,7 +592,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index 74929d7bd0..b51c195178 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -24,7 +24,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -368,7 +368,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $0 local.get $1 local.get $0 diff --git a/tests/compiler/typeof.untouched.wat b/tests/compiler/typeof.untouched.wat index 5b7fc71c44..bb5d963873 100644 --- a/tests/compiler/typeof.untouched.wat +++ b/tests/compiler/typeof.untouched.wat @@ -46,7 +46,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) @@ -276,7 +276,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 diff --git a/tests/compiler/wasi/abort.optimized.wat b/tests/compiler/wasi/abort.optimized.wat index 3fb0b39f6d..1f8d5069ad 100644 --- a/tests/compiler/wasi/abort.optimized.wat +++ b/tests/compiler/wasi/abort.optimized.wat @@ -18,7 +18,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/wasi/abort.untouched.wat b/tests/compiler/wasi/abort.untouched.wat index 861ad3fc12..44144138d2 100644 --- a/tests/compiler/wasi/abort.untouched.wat +++ b/tests/compiler/wasi/abort.untouched.wat @@ -22,7 +22,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -70,7 +70,7 @@ if local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 192 i32.or local.set $8 @@ -130,13 +130,13 @@ local.set $7 local.get $7 i32.const 18 - i32.shr_s + i32.shr_u i32.const 240 i32.or local.set $8 local.get $7 i32.const 12 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -144,7 +144,7 @@ local.set $10 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -184,13 +184,13 @@ end local.get $7 i32.const 12 - i32.shr_s + i32.shr_u i32.const 224 i32.or local.set $9 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index 7d95bdc4ec..1d8aa7d06c 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -23,21 +23,21 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor i64.const -49064778989728563 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor i64.const -4265267296055464877 i64.mul local.tee $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor ) (func $~lib/math/splitMix32 (param $0 i32) (result i32) @@ -47,7 +47,7 @@ local.tee $0 local.get $0 i32.const 15 - i32.shr_s + i32.shr_u i32.xor local.get $0 i32.const 1 @@ -61,7 +61,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_s + i32.shr_u i32.xor i32.mul i32.add @@ -69,7 +69,7 @@ local.tee $0 local.get $0 i32.const 14 - i32.shr_s + i32.shr_u i32.xor ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (result i32) @@ -311,7 +311,7 @@ i32.const 1036 i32.load i32.const 1 - i32.shr_s + i32.shr_u call $~lib/string/String.UTF8.encodeUnsafe i32.const 23 i32.add @@ -473,17 +473,17 @@ local.tee $1 local.get $1 i64.const 17 - i64.shr_s + i64.shr_u i64.xor i64.xor local.get $0 i64.const 26 - i64.shr_s + i64.shr_u i64.xor global.set $~lib/math/random_state1_64 local.get $0 i64.const 12 - i64.shr_s + i64.shr_u i64.const 4607182418800017408 i64.or f64.reinterpret_i64 diff --git a/tests/compiler/wasi/seed.untouched.wat b/tests/compiler/wasi/seed.untouched.wat index 5d80362b45..1dec2cce96 100644 --- a/tests/compiler/wasi/seed.untouched.wat +++ b/tests/compiler/wasi/seed.untouched.wat @@ -55,7 +55,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -65,7 +65,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -75,7 +75,7 @@ local.get $0 local.get $0 i64.const 33 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -88,7 +88,7 @@ local.get $0 local.get $0 i32.const 15 - i32.shr_s + i32.shr_u i32.xor local.get $0 i32.const 1 @@ -100,7 +100,7 @@ local.get $0 local.get $0 i32.const 7 - i32.shr_s + i32.shr_u i32.xor local.get $0 i32.const 61 @@ -112,7 +112,7 @@ local.get $0 local.get $0 i32.const 14 - i32.shr_s + i32.shr_u i32.xor ) (func $~lib/rt/stub/__retain (param $0 i32) (result i32) @@ -124,7 +124,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -172,7 +172,7 @@ if local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 192 i32.or local.set $8 @@ -232,13 +232,13 @@ local.set $7 local.get $7 i32.const 18 - i32.shr_s + i32.shr_u i32.const 240 i32.or local.set $8 local.get $7 i32.const 12 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -246,7 +246,7 @@ local.set $10 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -286,13 +286,13 @@ end local.get $7 i32.const 12 - i32.shr_s + i32.shr_u i32.const 224 i32.or local.set $9 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -644,7 +644,7 @@ local.get $0 local.get $0 i64.const 17 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 @@ -654,14 +654,14 @@ local.get $0 local.get $1 i64.const 26 - i64.shr_s + i64.shr_u i64.xor local.set $0 local.get $0 global.set $~lib/math/random_state1_64 local.get $1 i64.const 12 - i64.shr_s + i64.shr_u i64.const 4607182418800017408 i64.or local.set $2 diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index c8035b2aed..264ec7194d 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -155,7 +155,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.tee $2 local.get $4 local.get $2 @@ -199,7 +199,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -444,7 +444,7 @@ local.get $3 local.get $11 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.tee $2 call $~lib/util/number/decimalCount32 @@ -691,7 +691,7 @@ i64.mul local.tee $3 local.get $13 - i64.shr_s + i64.shr_u local.tee $1 local.get $6 i64.extend_i32_s @@ -1347,7 +1347,7 @@ f64.ne i32.add i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.tee $4 @@ -1375,12 +1375,12 @@ local.set $2 local.get $6 i64.const 32 - i64.shr_s + i64.shr_u local.tee $6 global.get $~lib/util/number/_frc_plus local.tee $5 i64.const 32 - i64.shr_s + i64.shr_u local.tee $7 i64.mul local.get $2 @@ -1393,11 +1393,11 @@ local.tee $5 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $5 local.get $6 @@ -1409,7 +1409,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.sub @@ -1430,7 +1430,7 @@ i64.shl local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u local.tee $7 i64.mul local.get $2 @@ -1443,11 +1443,11 @@ local.tee $3 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $7 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $3 local.get $6 @@ -1459,7 +1459,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add global.get $~lib/util/number/_exp_pow local.tee $4 @@ -1480,7 +1480,7 @@ global.get $~lib/util/number/_frc_minus local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u local.tee $5 i64.mul local.get $2 @@ -1493,11 +1493,11 @@ local.tee $2 i64.mul i64.const 32 - i64.shr_s + i64.shr_u i64.add local.tee $3 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.get $2 local.get $6 @@ -1509,7 +1509,7 @@ i64.const 2147483647 i64.add i64.const 32 - i64.shr_s + i64.shr_u i64.add i64.const 1 i64.add diff --git a/tests/compiler/wasi/trace.untouched.wat b/tests/compiler/wasi/trace.untouched.wat index 6a72f27da0..78bd45543a 100644 --- a/tests/compiler/wasi/trace.untouched.wat +++ b/tests/compiler/wasi/trace.untouched.wat @@ -176,7 +176,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $1 local.tee $4 @@ -265,7 +265,7 @@ i32.sub i32.load offset=12 i32.const 1 - i32.shr_s + i32.shr_u ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -313,7 +313,7 @@ if local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 192 i32.or local.set $8 @@ -373,13 +373,13 @@ local.set $7 local.get $7 i32.const 18 - i32.shr_s + i32.shr_u i32.const 240 i32.or local.set $8 local.get $7 i32.const 12 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -387,7 +387,7 @@ local.set $10 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -427,13 +427,13 @@ end local.get $7 i32.const 12 - i32.shr_s + i32.shr_u i32.const 224 i32.or local.set $9 local.get $7 i32.const 6 - i32.shr_s + i32.shr_u i32.const 63 i32.and i32.const 128 @@ -580,7 +580,7 @@ local.get $3 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $11 local.get $3 @@ -901,7 +901,7 @@ local.get $12 local.get $7 i64.extend_i32_s - i64.shr_s + i64.shr_u local.set $22 local.get $22 local.get $14 @@ -1302,7 +1302,7 @@ local.get $0 local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1318,7 +1318,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1334,7 +1334,7 @@ i32.add local.get $3 i32.const 24 - i32.shr_s + i32.shr_u local.get $4 i32.const 8 i32.shl @@ -1350,7 +1350,7 @@ i32.add local.get $4 i32.const 24 - i32.shr_s + i32.shr_u local.get $3 i32.const 8 i32.shl @@ -1423,7 +1423,7 @@ local.get $0 local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1439,7 +1439,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -1455,7 +1455,7 @@ i32.add local.get $3 i32.const 16 - i32.shr_s + i32.shr_u local.get $4 i32.const 16 i32.shl @@ -1471,7 +1471,7 @@ i32.add local.get $4 i32.const 16 - i32.shr_s + i32.shr_u local.get $3 i32.const 16 i32.shl @@ -1530,7 +1530,7 @@ local.get $0 local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -1546,7 +1546,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -1562,7 +1562,7 @@ i32.add local.get $3 i32.const 8 - i32.shr_s + i32.shr_u local.get $4 i32.const 24 i32.shl @@ -1578,7 +1578,7 @@ i32.add local.get $4 i32.const 8 - i32.shr_s + i32.shr_u local.get $3 i32.const 24 i32.shl @@ -2810,7 +2810,7 @@ i64.const 9218868437227405312 i64.and i64.const 52 - i64.shr_s + i64.shr_u i32.wrap_i64 local.set $7 local.get $6 @@ -2909,7 +2909,7 @@ local.set $15 local.get $15 i32.const 3 - i32.shr_u + i32.shr_s i32.const 1 i32.add local.set $14 @@ -2964,11 +2964,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -2979,7 +2979,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -2996,11 +2996,11 @@ local.set $24 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $24 i64.const 32 - i64.shr_s + i64.shr_u local.set $24 local.get $20 local.get $21 @@ -3034,11 +3034,11 @@ local.set $22 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $23 local.get $22 @@ -3049,7 +3049,7 @@ i64.mul local.get $19 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $18 local.get $23 @@ -3066,11 +3066,11 @@ local.set $25 local.get $18 i64.const 32 - i64.shr_s + i64.shr_u local.set $18 local.get $25 i64.const 32 - i64.shr_s + i64.shr_u local.set $25 local.get $21 local.get $20 @@ -3106,11 +3106,11 @@ local.set $19 local.get $17 i64.const 32 - i64.shr_s + i64.shr_u local.set $20 local.get $11 i64.const 32 - i64.shr_s + i64.shr_u local.set $21 local.get $18 local.get $19 @@ -3121,7 +3121,7 @@ i64.mul local.get $22 i64.const 32 - i64.shr_s + i64.shr_u i64.add local.set $23 local.get $18 @@ -3138,11 +3138,11 @@ local.set $27 local.get $23 i64.const 32 - i64.shr_s + i64.shr_u local.set $23 local.get $27 i64.const 32 - i64.shr_s + i64.shr_u local.set $27 local.get $20 local.get $21 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index a7247b7505..2d68ddf8bf 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -155,7 +155,7 @@ if local.get $2 i32.const 4 - i32.shr_s + i32.shr_u local.set $2 else local.get $2 @@ -166,7 +166,7 @@ local.tee $3 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $2 @@ -456,7 +456,7 @@ if local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $3 @@ -467,7 +467,7 @@ local.tee $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 16 i32.xor local.set $3 @@ -851,7 +851,7 @@ i32.const -65536 i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $1 local.get $2 local.get $1 diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index ef4bf2ac0f..4886d25300 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -545,7 +545,7 @@ local.set $4 local.get $3 i32.const 4 - i32.shr_s + i32.shr_u local.set $5 else i32.const 31 @@ -557,7 +557,7 @@ local.get $4 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -931,7 +931,7 @@ local.set $9 local.get $8 i32.const 4 - i32.shr_s + i32.shr_u local.set $10 else i32.const 31 @@ -943,7 +943,7 @@ local.get $9 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1256,7 +1256,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $3 local.get $3 local.get $2 @@ -1420,7 +1420,7 @@ local.set $2 local.get $1 i32.const 4 - i32.shr_s + i32.shr_u local.set $3 else local.get $1 @@ -1450,7 +1450,7 @@ local.get $2 i32.const 4 i32.sub - i32.shr_s + i32.shr_u i32.const 1 i32.const 4 i32.shl @@ -1640,7 +1640,7 @@ i32.xor i32.and i32.const 16 - i32.shr_s + i32.shr_u local.set $4 local.get $2 local.tee $3 From 31ab8a6fd627200f779f0e45a1998b7ebfc72824 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 29 Sep 2020 11:56:10 +0300 Subject: [PATCH 6/8] cleanup --- tests/compiler/optimize-instruction-regressions.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 tests/compiler/optimize-instruction-regressions.json diff --git a/tests/compiler/optimize-instruction-regressions.json b/tests/compiler/optimize-instruction-regressions.json deleted file mode 100644 index c2f49a5e60..0000000000 --- a/tests/compiler/optimize-instruction-regressions.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "asc_flags": [ - "--runtime none", - "-O0", - "--runPasses optimize-instructions" - ] -} From fc2336a84cdf238de4f0aacdee5179cde19f5786 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 29 Sep 2020 12:17:48 +0300 Subject: [PATCH 7/8] rearrange changed opcode values --- src/module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module.ts b/src/module.ts index b3c1ecb5e0..c2093b252c 100644 --- a/src/module.ts +++ b/src/module.ts @@ -249,8 +249,8 @@ export enum BinaryOp { OrI32 = 8 /* _BinaryenOrInt32 */, XorI32 = 9 /* _BinaryenXorInt32 */, ShlI32 = 10 /* _BinaryenShlInt32 */, - ShrU32 = 12 /* _BinaryenShrUInt32 */, ShrI32 = 11 /* _BinaryenShrSInt32 */, + ShrU32 = 12 /* _BinaryenShrUInt32 */, RotlI32 = 13 /* _BinaryenRotLInt32 */, RotrI32 = 14 /* _BinaryenRotRInt32 */, EqI32 = 15 /* _BinaryenEqInt32 */, @@ -274,8 +274,8 @@ export enum BinaryOp { OrI64 = 33 /* _BinaryenOrInt64 */, XorI64 = 34 /* _BinaryenXorInt64 */, ShlI64 = 35 /* _BinaryenShlInt64 */, - ShrU64 = 37 /* _BinaryenShrUInt64 */, ShrI64 = 36 /* _BinaryenShrSInt64 */, + ShrU64 = 37 /* _BinaryenShrUInt64 */, RotlI64 = 38 /* _BinaryenRotLInt64 */, RotrI64 = 39 /* _BinaryenRotRInt64 */, EqI64 = 40 /* _BinaryenEqInt64 */, From 77fbfa183a0bb7a20da5191e484f56bdc0fa8d6a Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 29 Sep 2020 13:41:56 +0300 Subject: [PATCH 8/8] revert some changes in package-lock --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index dc6542a89a..184f4f2e12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8592,7 +8592,7 @@ } }, "semantic-release": { - "version": "github:dcodeIO/semantic-release#3cec5c74de58a4e539d792c807e82ee4500cf28a", + "version": "github:dcodeIO/semantic-release#5367f573d21743be81ae1190877a8315405fd364", "from": "github:dcodeIO/semantic-release", "dev": true, "requires": {