From 29ac55fc46c9a70638af3284f73dd38f33abf9f3 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 17 Jul 2021 09:03:16 +0300 Subject: [PATCH 1/6] update binaryen --- package-lock.json | 14 +- package.json | 2 +- tests/compiler/features/simd.optimized.wat | 2182 +++++++++++++++++++- 3 files changed, 2078 insertions(+), 120 deletions(-) diff --git a/package-lock.json b/package-lock.json index 62088bf181..9a78b9d2bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "101.0.0-nightly.20210703", + "binaryen": "101.0.0-nightly.20210717", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" @@ -732,9 +732,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "101.0.0-nightly.20210703", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210703.tgz", - "integrity": "sha512-7iuRy/aSsd8BlO0ZOG4GqDI8z66UhazD10eeC3i14SOhZJ+MLC3I+BX5ydr3nk9g5j2PDGndxuYvm0gy+VJHYg==", + "version": "101.0.0-nightly.20210717", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210717.tgz", + "integrity": "sha512-qu7BmBqdEmmEl9+FGMgkABBqBPMv2ivKr/DQuyVejPSwoPpwmcrtqij5YFwDqolIcozWAPN3k51W3Pio0ab0Vw==", "bin": { "wasm-opt": "bin/wasm-opt" } @@ -3497,9 +3497,9 @@ "dev": true }, "binaryen": { - "version": "101.0.0-nightly.20210703", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210703.tgz", - "integrity": "sha512-7iuRy/aSsd8BlO0ZOG4GqDI8z66UhazD10eeC3i14SOhZJ+MLC3I+BX5ydr3nk9g5j2PDGndxuYvm0gy+VJHYg==" + "version": "101.0.0-nightly.20210717", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210717.tgz", + "integrity": "sha512-qu7BmBqdEmmEl9+FGMgkABBqBPMv2ivKr/DQuyVejPSwoPpwmcrtqij5YFwDqolIcozWAPN3k51W3Pio0ab0Vw==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index 3e68023836..af6d3e9a97 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "101.0.0-nightly.20210703", + "binaryen": "101.0.0-nightly.20210717", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" diff --git a/tests/compiler/features/simd.optimized.wat b/tests/compiler/features/simd.optimized.wat index 157f04d2a6..193b366058 100644 --- a/tests/compiler/features/simd.optimized.wat +++ b/tests/compiler/features/simd.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -997,203 +997,2161 @@ local.get $0 call $~lib/rt/tlsf/insertBlock ) - (func $~start - (local $0 i32) - global.get $~lib/rt/tlsf/ROOT + (func $features/simd/test_i8x16 + (local $0 v128) + (local $1 v128) + (local $2 v128) + (local $3 v128) + v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d + local.tee $2 + v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d + i8x16.eq + i8x16.all_true i32.eqz if - call $~lib/rt/tlsf/initialize + i32.const 0 + i32.const 1184 + i32.const 131 + i32.const 3 + call $~lib/builtins/abort + unreachable end - global.get $~lib/rt/tlsf/ROOT - i32.const 64 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - local.get $0 - v128.load offset=16 - v128.store offset=32 - local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT + i32.const 1 + i8x16.splat + local.tee $1 + v128.const i32x4 0x01010101 0x01010101 0x01010101 0x01010101 + i8x16.eq + i8x16.all_true i32.eqz if - call $~lib/rt/tlsf/initialize + i32.const 0 + i32.const 1184 + i32.const 133 + i32.const 3 + call $~lib/builtins/abort + unreachable end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add + local.get $2 + local.get $1 + i8x16.add local.tee $0 - i32.const 42 - i32.store8 - local.get $0 - v128.load8_splat - v128.const i32x4 0x2a2a2a2a 0x2a2a2a2a 0x2a2a2a2a 0x2a2a2a2a + v128.const i32x4 0x05040302 0x09080706 0x0d0c0b0a 0x80100f0e i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 59 - i32.const 5 + i32.const 135 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT + local.get $1 + i8x16.sub + local.get $2 + i8x16.eq + i8x16.all_true i32.eqz if - call $~lib/rt/tlsf/initialize + i32.const 0 + i32.const 1184 + i32.const 136 + i32.const 3 + call $~lib/builtins/abort + unreachable end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i32.const 42 - i32.store16 - local.get $0 - v128.load16_splat - v128.const i32x4 0x002a002a 0x002a002a 0x002a002a 0x002a002a + local.get $2 + i8x16.neg + v128.const i32x4 0xfcfdfeff 0xf8f9fafb 0xf4f5f6f7 0x81f1f2f3 i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 69 - i32.const 5 + i32.const 177 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT + i8x16.extract_lane_s 0 + i32.const 255 + i32.and + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1184 + i32.const 182 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i8x16.extract_lane_s 15 + i32.const 255 + i32.and + i32.const 128 + i32.ne + if + i32.const 0 + i32.const 1184 + i32.const 183 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i8x16.extract_lane_u 15 + i32.const 255 + i32.and + i32.const 128 + i32.ne + if + i32.const 0 + i32.const 1184 + i32.const 184 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 17 + i8x16.replace_lane 15 + v128.const i32x4 0x05040302 0x09080706 0x0d0c0b0a 0x11100f0e + i8x16.eq + i8x16.all_true i32.eqz if - call $~lib/rt/tlsf/initialize + i32.const 0 + i32.const 1184 + i32.const 185 + i32.const 3 + call $~lib/builtins/abort + unreachable end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add + local.get $2 + local.get $1 + i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 + v128.const i32x4 0x04030201 0x08070605 0x01010101 0x01010101 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 190 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i8x16.splat local.tee $0 - i32.const 42 - i32.store + i32.const 1 + i8x16.replace_lane 0 + local.set $1 local.get $0 - v128.load32_splat - v128.const i32x4 0x0000002a 0x0000002a 0x0000002a 0x0000002a + i32.const -1 + i8x16.replace_lane 0 + local.tee $0 + v128.not + local.set $3 + local.get $0 + local.get $1 + i8x16.eq + local.get $3 i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 79 - i32.const 5 + i32.const 228 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT + local.get $1 + i8x16.ne + local.get $0 + i8x16.eq + i8x16.all_true i32.eqz if - call $~lib/rt/tlsf/initialize + i32.const 0 + i32.const 1184 + i32.const 229 + i32.const 3 + call $~lib/builtins/abort + unreachable end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i64.const 42 - i64.store local.get $0 - v128.load64_splat - v128.const i32x4 0x0000002a 0x00000000 0x0000002a 0x00000000 + local.get $1 + i8x16.lt_s + local.get $0 i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 89 - i32.const 5 + i32.const 230 + i32.const 3 call $~lib/builtins/abort unreachable end + local.get $1 local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT + i8x16.lt_u + local.get $0 + i8x16.eq + i8x16.all_true i32.eqz if - call $~lib/rt/tlsf/initialize + i32.const 0 + i32.const 1184 + i32.const 231 + i32.const 3 + call $~lib/builtins/abort + unreachable end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i32.const 42 - i32.store + local.get $1 local.get $0 - v128.load32_zero - v128.const i32x4 0x00000000 0x00000000 0x00000000 0x0000002a + i8x16.le_s + local.get $3 i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 99 - i32.const 5 + i32.const 232 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT + local.get $1 + i8x16.le_u + local.get $3 + i8x16.eq + i8x16.all_true i32.eqz if - call $~lib/rt/tlsf/initialize + i32.const 0 + i32.const 1184 + i32.const 233 + i32.const 3 + call $~lib/builtins/abort + unreachable end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i64.const 42 - i64.store + local.get $1 + local.get $0 + i8x16.gt_s local.get $0 - v128.load64_zero - v128.const i32x4 0x00000000 0x00000000 0x0000002a 0x00000000 i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 109 - i32.const 5 + i32.const 234 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/tlsf/__free - i32.const 0 - i32.const 1184 - i32.const 255 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $1 + i8x16.gt_u + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 235 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i8x16.ge_s + local.get $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 236 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i8x16.ge_u + local.get $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 237 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + v128.const i32x4 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c + local.tee $0 + v128.const i32x4 0x13121110 0x17161514 0x1b1a1918 0x1f1e1d1c + i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 + v128.const i32x4 0x13021100 0x17061504 0x1b0a1908 0x1f0e1d0c + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 243 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + v128.const i32x4 0x0c0d0e10 0x08090a0b 0x04050607 0x00010203 + i8x16.swizzle + v128.const i32x4 0x0c0d0e00 0x08090a0b 0x04050607 0x00010203 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 249 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i8x16.popcnt + v128.const i32x4 0x02010100 0x03020201 0x03020201 0x04030302 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 255 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + ) + (func $features/simd/test_i16x8 + (local $0 v128) + (local $1 v128) + (local $2 i32) + (local $3 v128) + v128.const i32x4 0x00020001 0x00040003 0x00060005 0x7fff0007 + local.tee $1 + v128.const i32x4 0x00020001 0x00040003 0x00060005 0x7fff0007 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 260 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + i16x8.splat + local.tee $3 + v128.const i32x4 0x00010001 0x00010001 0x00010001 0x00010001 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 262 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $3 + i16x8.add + local.tee $0 + v128.const i32x4 0x00030002 0x00050004 0x00070006 0x80000008 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 264 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $3 + i16x8.sub + local.get $1 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 265 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $3 + i16x8.mul + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 266 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i16x8.neg + v128.const i32x4 0xfffeffff 0xfffcfffd 0xfffafffb 0x8001fff9 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 307 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i16x8.extract_lane_s 0 + i32.const 65535 + i32.and + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1184 + i32.const 312 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i16x8.extract_lane_s 7 + i32.const 65535 + i32.and + i32.const 32768 + i32.ne + if + i32.const 0 + i32.const 1184 + i32.const 313 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i16x8.extract_lane_u 7 + i32.const 65535 + i32.and + i32.const 32768 + i32.ne + if + i32.const 0 + i32.const 1184 + i32.const 314 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 9 + i16x8.replace_lane 7 + v128.const i32x4 0x00030002 0x00050004 0x00070006 0x00090008 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 315 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $3 + i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 + v128.const i32x4 0x00020001 0x00040003 0x00010001 0x00010001 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 320 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i16x8.splat + local.tee $1 + i32.const -1 + i16x8.replace_lane 0 + local.tee $0 + local.get $1 + i32.const 1 + i16x8.replace_lane 0 + local.tee $1 + i16x8.eq + local.get $0 + v128.not + local.tee $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 358 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i16x8.ne + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 359 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i16x8.lt_s + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 360 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i16x8.lt_u + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 361 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i16x8.le_s + local.get $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 362 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i16x8.le_u + local.get $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 363 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i16x8.gt_s + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 364 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i16x8.gt_u + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 365 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i16x8.ge_s + local.get $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i16x8.ge_u + local.get $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $2 + i32.const 1 + i32.store8 + local.get $2 + i32.const 2 + i32.store8 offset=1 + local.get $2 + i32.const 3 + i32.store8 offset=2 + local.get $2 + i32.const 4 + i32.store8 offset=3 + local.get $2 + i32.const 5 + i32.store8 offset=4 + local.get $2 + i32.const 6 + i32.store8 offset=5 + local.get $2 + i32.const 7 + i32.store8 offset=6 + local.get $2 + i32.const 255 + i32.store8 offset=7 + local.get $2 + v128.load8x8_s align=1 + v128.const i32x4 0x00020001 0x00040003 0x00060005 0xffff0007 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 384 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + v128.load8x8_u align=1 + v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00ff0007 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 389 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/rt/tlsf/__free + ) + (func $features/simd/test_i32x4 + (local $0 v128) + (local $1 v128) + (local $2 v128) + (local $3 i32) + v128.const i32x4 0x00000001 0x00000002 0x00000003 0x7fffffff + local.tee $1 + v128.const i32x4 0x00000001 0x00000002 0x00000003 0x7fffffff + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 409 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + i32x4.splat + local.tee $2 + v128.const i32x4 0x00000001 0x00000001 0x00000001 0x00000001 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 411 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32x4.add + local.tee $0 + v128.const i32x4 0x00000002 0x00000003 0x00000004 0x80000000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 413 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32x4.sub + local.get $1 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 414 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32x4.mul + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 415 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32x4.neg + v128.const i32x4 0xffffffff 0xfffffffe 0xfffffffd 0x80000001 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 456 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32x4.extract_lane 0 + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1184 + i32.const 461 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32x4.extract_lane 3 + i32.const -2147483648 + i32.ne + if + i32.const 0 + i32.const 1184 + i32.const 462 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32x4.replace_lane 3 + v128.const i32x4 0x00000002 0x00000003 0x00000004 0x00000005 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 463 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 + v128.const i32x4 0x00000001 0x00000002 0x00000001 0x00000001 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 468 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32x4.splat + local.tee $1 + i32.const -1 + i32x4.replace_lane 0 + local.tee $0 + local.get $1 + i32.const 1 + i32x4.replace_lane 0 + local.tee $1 + i32x4.eq + local.get $0 + v128.not + local.tee $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 482 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32x4.ne + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 483 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32x4.lt_s + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 484 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32x4.lt_u + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 485 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32x4.le_s + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 486 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32x4.le_u + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 487 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32x4.gt_s + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 488 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32x4.gt_u + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 489 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32x4.ge_s + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 490 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32x4.ge_u + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 491 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $3 + i32.const 1 + i32.store16 + local.get $3 + i32.const 2 + i32.store16 offset=2 + local.get $3 + i32.const 3 + i32.store16 offset=4 + local.get $3 + i32.const 65535 + i32.store16 offset=6 + local.get $3 + v128.load16x4_s align=2 + v128.const i32x4 0x00000001 0x00000002 0x00000003 0xffffffff + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 512 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 + v128.load16x4_u align=2 + v128.const i32x4 0x00000001 0x00000002 0x00000003 0x0000ffff + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 517 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 + call $~lib/rt/tlsf/__free + ) + (func $features/simd/test_f32x4 + (local $0 v128) + (local $1 v128) + (local $2 v128) + (local $3 v128) + v128.const i32x4 0x3fc00000 0x40200000 0x40600000 0x40900000 + local.tee $0 + v128.const i32x4 0x3fc00000 0x40200000 0x40600000 0x40900000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 591 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f32.const 1 + f32x4.splat + local.tee $2 + v128.const i32x4 0x3f800000 0x3f800000 0x3f800000 0x3f800000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 593 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + f32x4.add + local.tee $1 + v128.const i32x4 0x40200000 0x40600000 0x40900000 0x40b00000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 595 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + f32x4.sub + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 596 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + f32x4.mul + local.get $1 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 597 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $0 + f32x4.mul + local.tee $3 + local.get $0 + f32x4.div + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 599 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $0 + f32x4.mul + local.get $0 + i8x16.ne + v128.any_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 600 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f32x4.neg + v128.const i32x4 0xbfc00000 0xc0200000 0xc0600000 0xc0900000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 601 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f32x4.extract_lane 0 + f32.const 2.5 + f32.ne + if + i32.const 0 + i32.const 1184 + i32.const 602 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f32x4.extract_lane 3 + f32.const 5.5 + f32.ne + if + i32.const 0 + i32.const 1184 + i32.const 603 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f32.const 6.5 + f32x4.replace_lane 3 + v128.const i32x4 0x40200000 0x40600000 0x40900000 0x40d00000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 604 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 + v128.const i32x4 0x3fc00000 0x40200000 0x3f800000 0x3f800000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 609 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f32.const 0 + f32x4.splat + local.tee $1 + f32.const 1 + f32x4.replace_lane 0 + local.set $0 + v128.const i32x4 0xffffffff 0x00000000 0x00000000 0x00000000 + local.set $2 + local.get $1 + f32.const -1 + f32x4.replace_lane 0 + local.tee $1 + local.get $0 + f32x4.eq + v128.const i32x4 0x00000000 0xffffffff 0xffffffff 0xffffffff + local.tee $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 618 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + f32x4.ne + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 619 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + f32x4.lt + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 620 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + f32x4.le + local.get $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 621 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + f32x4.gt + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 622 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + f32x4.ge + local.get $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 623 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + f32x4.min + local.get $1 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 624 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + f32x4.max + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 625 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f32x4.abs + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 626 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + ) + (func $features/simd/test_f64x2 + (local $0 v128) + (local $1 v128) + (local $2 v128) + (local $3 v128) + v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x40040000 + local.tee $0 + v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x40040000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 645 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f64.const 1 + f64x2.splat + local.tee $2 + v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x3ff00000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 647 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + f64x2.add + local.tee $1 + v128.const i32x4 0x00000000 0x40040000 0x00000000 0x400c0000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 649 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + f64x2.sub + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 650 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + f64x2.mul + local.get $1 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 651 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $0 + f64x2.mul + local.tee $3 + local.get $0 + f64x2.div + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 653 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $0 + f64x2.mul + local.get $0 + i8x16.ne + v128.any_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 654 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f64x2.neg + v128.const i32x4 0x00000000 0xbff80000 0x00000000 0xc0040000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 655 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f64x2.extract_lane 0 + f64.const 2.5 + f64.ne + if + i32.const 0 + i32.const 1184 + i32.const 656 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f64x2.extract_lane 1 + f64.const 3.5 + f64.ne + if + i32.const 0 + i32.const 1184 + i32.const 657 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f64.const 4.5 + f64x2.replace_lane 1 + v128.const i32x4 0x00000000 0x40040000 0x00000000 0x40120000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 658 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 + v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x3ff00000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 663 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + f64.const 0 + f64x2.splat + local.tee $1 + f64.const 1 + f64x2.replace_lane 0 + local.set $0 + v128.const i32x4 0xffffffff 0xffffffff 0x00000000 0x00000000 + local.set $2 + local.get $1 + f64.const -1 + f64x2.replace_lane 0 + local.tee $1 + local.get $0 + f64x2.eq + v128.const i32x4 0x00000000 0x00000000 0xffffffff 0xffffffff + local.tee $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 672 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + f64x2.ne + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 673 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + f64x2.lt + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 674 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + f64x2.le + local.get $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 675 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + f64x2.gt + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 676 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + f64x2.ge + local.get $3 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 677 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + f64x2.min + local.get $1 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 678 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + f64x2.max + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 679 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + f64x2.abs + local.get $0 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 680 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + ) + (func $~start + (local $0 i32) + (local $1 v128) + (local $2 v128) + (local $3 v128) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 64 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + local.get $0 + v128.load offset=16 + v128.store offset=32 + local.get $0 + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 42 + i32.store8 + local.get $0 + v128.load8_splat + v128.const i32x4 0x2a2a2a2a 0x2a2a2a2a 0x2a2a2a2a 0x2a2a2a2a + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 59 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 42 + i32.store16 + local.get $0 + v128.load16_splat + v128.const i32x4 0x002a002a 0x002a002a 0x002a002a 0x002a002a + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 69 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 42 + i32.store + local.get $0 + v128.load32_splat + v128.const i32x4 0x0000002a 0x0000002a 0x0000002a 0x0000002a + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 79 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i64.const 42 + i64.store + local.get $0 + v128.load64_splat + v128.const i32x4 0x0000002a 0x00000000 0x0000002a 0x00000000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 89 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 42 + i32.store + local.get $0 + v128.load32_zero + v128.const i32x4 0x00000000 0x00000000 0x00000000 0x0000002a + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 99 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i64.const 42 + i64.store + local.get $0 + v128.load64_zero + v128.const i32x4 0x00000000 0x00000000 0x0000002a 0x00000000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 109 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/__free + call $features/simd/test_i8x16 + call $features/simd/test_i16x8 + call $features/simd/test_i32x4 + v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x7fffffff + local.tee $2 + v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x7fffffff + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 538 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i64.const 1 + i64x2.splat + local.tee $3 + v128.const i32x4 0x00000001 0x00000000 0x00000001 0x00000000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 540 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $3 + i64x2.add + local.tee $1 + v128.const i32x4 0x00000002 0x00000000 0x00000000 0x80000000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 542 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $3 + i64x2.sub + local.get $2 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 543 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $3 + i64x2.mul + local.get $1 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 544 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i64x2.neg + v128.const i32x4 0xffffffff 0xffffffff 0x00000001 0x80000000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 545 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64x2.extract_lane 0 + i64.const 2 + i64.ne + if + i32.const 0 + i32.const 1184 + i32.const 550 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64x2.extract_lane 1 + i64.const -9223372036854775808 + i64.ne + if + i32.const 0 + i32.const 1184 + i32.const 551 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i64.const 3 + i64x2.replace_lane 1 + v128.const i32x4 0x00000002 0x00000000 0x00000003 0x00000000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 552 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $3 + i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 + v128.const i32x4 0x00000001 0x00000000 0x00000001 0x00000000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 557 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 1 + i32.store + local.get $0 + i32.const -1 + i32.store offset=4 + local.get $0 + v128.load32x2_s align=4 + v128.const i32x4 0x00000001 0x00000000 0xffffffff 0xffffffff + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 571 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + v128.load32x2_u align=4 + v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x00000000 + i8x16.eq + i8x16.all_true + i32.eqz + if + i32.const 0 + i32.const 1184 + i32.const 576 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/__free + call $features/simd/test_f32x4 + call $features/simd/test_f64x2 ) ) From 473f9d358c863014187af40be4f1349827859fad Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 20 Jul 2021 07:30:59 +0300 Subject: [PATCH 2/6] update --- package-lock.json | 14 +- package.json | 2 +- tests/compiler/features/simd.optimized.wat | 2180 +------------------- 3 files changed, 119 insertions(+), 2077 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a78b9d2bf..66d0fa4b37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "101.0.0-nightly.20210717", + "binaryen": "101.0.0-nightly.20210720", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" @@ -732,9 +732,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "101.0.0-nightly.20210717", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210717.tgz", - "integrity": "sha512-qu7BmBqdEmmEl9+FGMgkABBqBPMv2ivKr/DQuyVejPSwoPpwmcrtqij5YFwDqolIcozWAPN3k51W3Pio0ab0Vw==", + "version": "101.0.0-nightly.20210720", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210720.tgz", + "integrity": "sha512-7Y2V2S60j+/YiAL0K/QL5ZKRrjkgq6AwduCswF989BXP/YHfRSshmZDLexrzqT3XV8roA4oeRK3IyV6iPAGRSg==", "bin": { "wasm-opt": "bin/wasm-opt" } @@ -3497,9 +3497,9 @@ "dev": true }, "binaryen": { - "version": "101.0.0-nightly.20210717", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210717.tgz", - "integrity": "sha512-qu7BmBqdEmmEl9+FGMgkABBqBPMv2ivKr/DQuyVejPSwoPpwmcrtqij5YFwDqolIcozWAPN3k51W3Pio0ab0Vw==" + "version": "101.0.0-nightly.20210720", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210720.tgz", + "integrity": "sha512-7Y2V2S60j+/YiAL0K/QL5ZKRrjkgq6AwduCswF989BXP/YHfRSshmZDLexrzqT3XV8roA4oeRK3IyV6iPAGRSg==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index af6d3e9a97..f7df6d76b4 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "101.0.0-nightly.20210717", + "binaryen": "101.0.0-nightly.20210720", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" diff --git a/tests/compiler/features/simd.optimized.wat b/tests/compiler/features/simd.optimized.wat index 193b366058..157f04d2a6 100644 --- a/tests/compiler/features/simd.optimized.wat +++ b/tests/compiler/features/simd.optimized.wat @@ -1,6 +1,6 @@ (module - (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -997,2161 +997,203 @@ local.get $0 call $~lib/rt/tlsf/insertBlock ) - (func $features/simd/test_i8x16 - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d - local.tee $2 - v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 131 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i8x16.splat - local.tee $1 - v128.const i32x4 0x01010101 0x01010101 0x01010101 0x01010101 - i8x16.eq - i8x16.all_true + (func $~start + (local $0 i32) + global.get $~lib/rt/tlsf/ROOT i32.eqz if - i32.const 0 - i32.const 1184 - i32.const 133 - i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/rt/tlsf/initialize end - local.get $2 - local.get $1 - i8x16.add + global.get $~lib/rt/tlsf/ROOT + i32.const 64 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add local.tee $0 - v128.const i32x4 0x05040302 0x09080706 0x0d0c0b0a 0x80100f0e - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 135 - i32.const 3 - call $~lib/builtins/abort - unreachable - end local.get $0 - local.get $1 - i8x16.sub - local.get $2 - i8x16.eq - i8x16.all_true + v128.load offset=16 + v128.store offset=32 + local.get $0 + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT i32.eqz if - i32.const 0 - i32.const 1184 - i32.const 136 - i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/rt/tlsf/initialize end - local.get $2 - i8x16.neg - v128.const i32x4 0xfcfdfeff 0xf8f9fafb 0xf4f5f6f7 0x81f1f2f3 + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 42 + i32.store8 + local.get $0 + v128.load8_splat + v128.const i32x4 0x2a2a2a2a 0x2a2a2a2a 0x2a2a2a2a 0x2a2a2a2a i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 177 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i8x16.extract_lane_s 0 - i32.const 255 - i32.and - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 182 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i8x16.extract_lane_s 15 - i32.const 255 - i32.and - i32.const 128 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 183 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i8x16.extract_lane_u 15 - i32.const 255 - i32.and - i32.const 128 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 184 - i32.const 3 + i32.const 59 + i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 17 - i8x16.replace_lane 15 - v128.const i32x4 0x05040302 0x09080706 0x0d0c0b0a 0x11100f0e - i8x16.eq - i8x16.all_true + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT i32.eqz if - i32.const 0 - i32.const 1184 - i32.const 185 - i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/rt/tlsf/initialize end - local.get $2 - local.get $1 - i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x04030201 0x08070605 0x01010101 0x01010101 + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 42 + i32.store16 + local.get $0 + v128.load16_splat + v128.const i32x4 0x002a002a 0x002a002a 0x002a002a 0x002a002a i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 190 - i32.const 3 + i32.const 69 + i32.const 5 call $~lib/builtins/abort unreachable end - i32.const 0 - i8x16.splat - local.tee $0 - i32.const 1 - i8x16.replace_lane 0 - local.set $1 - local.get $0 - i32.const -1 - i8x16.replace_lane 0 - local.tee $0 - v128.not - local.set $3 local.get $0 - local.get $1 - i8x16.eq - local.get $3 - i8x16.eq - i8x16.all_true + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT i32.eqz if - i32.const 0 - i32.const 1184 - i32.const 228 - i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/rt/tlsf/initialize end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 42 + i32.store local.get $0 - local.get $1 - i8x16.ne - local.get $0 + v128.load32_splat + v128.const i32x4 0x0000002a 0x0000002a 0x0000002a 0x0000002a i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 229 - i32.const 3 + i32.const 79 + i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 - local.get $1 - i8x16.lt_s - local.get $0 - i8x16.eq - i8x16.all_true + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT i32.eqz if - i32.const 0 - i32.const 1184 - i32.const 230 - i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/rt/tlsf/initialize end - local.get $1 - local.get $0 - i8x16.lt_u + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i64.const 42 + i64.store local.get $0 + v128.load64_splat + v128.const i32x4 0x0000002a 0x00000000 0x0000002a 0x00000000 i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 231 - i32.const 3 + i32.const 89 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 - i8x16.le_s - local.get $3 - i8x16.eq - i8x16.all_true + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT i32.eqz if - i32.const 0 - i32.const 1184 - i32.const 232 - i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/rt/tlsf/initialize end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i32.const 42 + i32.store local.get $0 - local.get $1 - i8x16.le_u - local.get $3 + v128.load32_zero + v128.const i32x4 0x00000000 0x00000000 0x00000000 0x0000002a i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 233 - i32.const 3 + i32.const 99 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 - i8x16.gt_s local.get $0 - i8x16.eq - i8x16.all_true + call $~lib/rt/tlsf/__free + global.get $~lib/rt/tlsf/ROOT i32.eqz if - i32.const 0 - i32.const 1184 - i32.const 234 - i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/rt/tlsf/initialize end + global.get $~lib/rt/tlsf/ROOT + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $0 + i64.const 42 + i64.store local.get $0 - local.get $1 - i8x16.gt_u - local.get $0 + v128.load64_zero + v128.const i32x4 0x00000000 0x00000000 0x0000002a 0x00000000 i8x16.eq i8x16.all_true i32.eqz if i32.const 0 i32.const 1184 - i32.const 235 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i8x16.ge_s - local.get $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 236 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i8x16.ge_u - local.get $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 237 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - v128.const i32x4 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c - local.tee $0 - v128.const i32x4 0x13121110 0x17161514 0x1b1a1918 0x1f1e1d1c - i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 - v128.const i32x4 0x13021100 0x17061504 0x1b0a1908 0x1f0e1d0c - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 243 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - v128.const i32x4 0x0c0d0e10 0x08090a0b 0x04050607 0x00010203 - i8x16.swizzle - v128.const i32x4 0x0c0d0e00 0x08090a0b 0x04050607 0x00010203 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 249 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i8x16.popcnt - v128.const i32x4 0x02010100 0x03020201 0x03020201 0x04030302 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 255 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - ) - (func $features/simd/test_i16x8 - (local $0 v128) - (local $1 v128) - (local $2 i32) - (local $3 v128) - v128.const i32x4 0x00020001 0x00040003 0x00060005 0x7fff0007 - local.tee $1 - v128.const i32x4 0x00020001 0x00040003 0x00060005 0x7fff0007 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 260 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i16x8.splat - local.tee $3 - v128.const i32x4 0x00010001 0x00010001 0x00010001 0x00010001 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 262 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $3 - i16x8.add - local.tee $0 - v128.const i32x4 0x00030002 0x00050004 0x00070006 0x80000008 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 264 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - i16x8.sub - local.get $1 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 265 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $3 - i16x8.mul - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 266 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i16x8.neg - v128.const i32x4 0xfffeffff 0xfffcfffd 0xfffafffb 0x8001fff9 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 307 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i16x8.extract_lane_s 0 - i32.const 65535 - i32.and - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 312 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i16x8.extract_lane_s 7 - i32.const 65535 - i32.and - i32.const 32768 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 313 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i16x8.extract_lane_u 7 - i32.const 65535 - i32.and - i32.const 32768 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 314 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 9 - i16x8.replace_lane 7 - v128.const i32x4 0x00030002 0x00050004 0x00070006 0x00090008 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 315 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $3 - i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x00020001 0x00040003 0x00010001 0x00010001 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 320 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i16x8.splat - local.tee $1 - i32.const -1 - i16x8.replace_lane 0 - local.tee $0 - local.get $1 - i32.const 1 - i16x8.replace_lane 0 - local.tee $1 - i16x8.eq - local.get $0 - v128.not - local.tee $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 358 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i16x8.ne - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 359 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i16x8.lt_s - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 360 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i16x8.lt_u - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 361 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i16x8.le_s - local.get $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 362 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i16x8.le_u - local.get $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 363 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i16x8.gt_s - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 364 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i16x8.gt_u - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 365 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i16x8.ge_s - local.get $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 366 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i16x8.ge_u - local.get $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 367 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $2 - i32.const 1 - i32.store8 - local.get $2 - i32.const 2 - i32.store8 offset=1 - local.get $2 - i32.const 3 - i32.store8 offset=2 - local.get $2 - i32.const 4 - i32.store8 offset=3 - local.get $2 - i32.const 5 - i32.store8 offset=4 - local.get $2 - i32.const 6 - i32.store8 offset=5 - local.get $2 - i32.const 7 - i32.store8 offset=6 - local.get $2 - i32.const 255 - i32.store8 offset=7 - local.get $2 - v128.load8x8_s align=1 - v128.const i32x4 0x00020001 0x00040003 0x00060005 0xffff0007 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 384 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - v128.load8x8_u align=1 - v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00ff0007 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 389 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/tlsf/__free - ) - (func $features/simd/test_i32x4 - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 i32) - v128.const i32x4 0x00000001 0x00000002 0x00000003 0x7fffffff - local.tee $1 - v128.const i32x4 0x00000001 0x00000002 0x00000003 0x7fffffff - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 409 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i32x4.splat - local.tee $2 - v128.const i32x4 0x00000001 0x00000001 0x00000001 0x00000001 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 411 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32x4.add - local.tee $0 - v128.const i32x4 0x00000002 0x00000003 0x00000004 0x80000000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 413 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32x4.sub - local.get $1 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 414 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i32x4.mul - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 415 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32x4.neg - v128.const i32x4 0xffffffff 0xfffffffe 0xfffffffd 0x80000001 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 456 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32x4.extract_lane 0 - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 461 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32x4.extract_lane 3 - i32.const -2147483648 - i32.ne - if - i32.const 0 - i32.const 1184 - i32.const 462 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 5 - i32x4.replace_lane 3 - v128.const i32x4 0x00000002 0x00000003 0x00000004 0x00000005 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 463 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x00000001 0x00000002 0x00000001 0x00000001 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 468 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32x4.splat - local.tee $1 - i32.const -1 - i32x4.replace_lane 0 - local.tee $0 - local.get $1 - i32.const 1 - i32x4.replace_lane 0 - local.tee $1 - i32x4.eq - local.get $0 - v128.not - local.tee $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 482 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32x4.ne - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 483 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32x4.lt_s - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 484 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32x4.lt_u - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 485 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32x4.le_s - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 486 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32x4.le_u - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 487 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32x4.gt_s - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 488 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32x4.gt_u - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 489 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32x4.ge_s - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 490 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32x4.ge_u - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 491 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $3 - i32.const 1 - i32.store16 - local.get $3 - i32.const 2 - i32.store16 offset=2 - local.get $3 - i32.const 3 - i32.store16 offset=4 - local.get $3 - i32.const 65535 - i32.store16 offset=6 - local.get $3 - v128.load16x4_s align=2 - v128.const i32x4 0x00000001 0x00000002 0x00000003 0xffffffff - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 512 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - v128.load16x4_u align=2 - v128.const i32x4 0x00000001 0x00000002 0x00000003 0x0000ffff - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 517 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/rt/tlsf/__free - ) - (func $features/simd/test_f32x4 - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - v128.const i32x4 0x3fc00000 0x40200000 0x40600000 0x40900000 - local.tee $0 - v128.const i32x4 0x3fc00000 0x40200000 0x40600000 0x40900000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 591 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - f32.const 1 - f32x4.splat - local.tee $2 - v128.const i32x4 0x3f800000 0x3f800000 0x3f800000 0x3f800000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 593 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - f32x4.add - local.tee $1 - v128.const i32x4 0x40200000 0x40600000 0x40900000 0x40b00000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 595 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - f32x4.sub - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 596 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - f32x4.mul - local.get $1 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 597 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - f32x4.mul - local.tee $3 - local.get $0 - f32x4.div - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 599 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $0 - f32x4.mul - local.get $0 - i8x16.ne - v128.any_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 600 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32x4.neg - v128.const i32x4 0xbfc00000 0xc0200000 0xc0600000 0xc0900000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 601 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32x4.extract_lane 0 - f32.const 2.5 - f32.ne - if - i32.const 0 - i32.const 1184 - i32.const 602 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32x4.extract_lane 3 - f32.const 5.5 - f32.ne - if - i32.const 0 - i32.const 1184 - i32.const 603 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32.const 6.5 - f32x4.replace_lane 3 - v128.const i32x4 0x40200000 0x40600000 0x40900000 0x40d00000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 604 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x3fc00000 0x40200000 0x3f800000 0x3f800000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 609 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - f32.const 0 - f32x4.splat - local.tee $1 - f32.const 1 - f32x4.replace_lane 0 - local.set $0 - v128.const i32x4 0xffffffff 0x00000000 0x00000000 0x00000000 - local.set $2 - local.get $1 - f32.const -1 - f32x4.replace_lane 0 - local.tee $1 - local.get $0 - f32x4.eq - v128.const i32x4 0x00000000 0xffffffff 0xffffffff 0xffffffff - local.tee $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 618 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - f32x4.ne - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 619 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - f32x4.lt - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 620 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - f32x4.le - local.get $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 621 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - f32x4.gt - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 622 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - f32x4.ge - local.get $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 623 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - f32x4.min - local.get $1 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 624 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - f32x4.max - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 625 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f32x4.abs - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 626 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - ) - (func $features/simd/test_f64x2 - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x40040000 - local.tee $0 - v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x40040000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 645 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - f64.const 1 - f64x2.splat - local.tee $2 - v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x3ff00000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 647 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - f64x2.add - local.tee $1 - v128.const i32x4 0x00000000 0x40040000 0x00000000 0x400c0000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 649 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - f64x2.sub - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 650 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - f64x2.mul - local.get $1 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 651 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - f64x2.mul - local.tee $3 - local.get $0 - f64x2.div - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 653 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $0 - f64x2.mul - local.get $0 - i8x16.ne - v128.any_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 654 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64x2.neg - v128.const i32x4 0x00000000 0xbff80000 0x00000000 0xc0040000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 655 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f64x2.extract_lane 0 - f64.const 2.5 - f64.ne - if - i32.const 0 - i32.const 1184 - i32.const 656 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f64x2.extract_lane 1 - f64.const 3.5 - f64.ne - if - i32.const 0 - i32.const 1184 - i32.const 657 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f64.const 4.5 - f64x2.replace_lane 1 - v128.const i32x4 0x00000000 0x40040000 0x00000000 0x40120000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 658 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 - i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x3ff00000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 663 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - f64.const 0 - f64x2.splat - local.tee $1 - f64.const 1 - f64x2.replace_lane 0 - local.set $0 - v128.const i32x4 0xffffffff 0xffffffff 0x00000000 0x00000000 - local.set $2 - local.get $1 - f64.const -1 - f64x2.replace_lane 0 - local.tee $1 - local.get $0 - f64x2.eq - v128.const i32x4 0x00000000 0x00000000 0xffffffff 0xffffffff - local.tee $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 672 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - f64x2.ne - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 673 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - f64x2.lt - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 674 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - f64x2.le - local.get $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 675 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - f64x2.gt - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 676 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - f64x2.ge - local.get $3 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 677 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - f64x2.min - local.get $1 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 678 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - f64x2.max - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 679 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - f64x2.abs - local.get $0 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 680 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - ) - (func $~start - (local $0 i32) - (local $1 v128) - (local $2 v128) - (local $3 v128) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 64 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - local.get $0 - v128.load offset=16 - v128.store offset=32 - local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i32.const 42 - i32.store8 - local.get $0 - v128.load8_splat - v128.const i32x4 0x2a2a2a2a 0x2a2a2a2a 0x2a2a2a2a 0x2a2a2a2a - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 59 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i32.const 42 - i32.store16 - local.get $0 - v128.load16_splat - v128.const i32x4 0x002a002a 0x002a002a 0x002a002a 0x002a002a - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 69 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i32.const 42 - i32.store - local.get $0 - v128.load32_splat - v128.const i32x4 0x0000002a 0x0000002a 0x0000002a 0x0000002a - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 79 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i64.const 42 - i64.store - local.get $0 - v128.load64_splat - v128.const i32x4 0x0000002a 0x00000000 0x0000002a 0x00000000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 89 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i32.const 42 - i32.store - local.get $0 - v128.load32_zero - v128.const i32x4 0x00000000 0x00000000 0x00000000 0x0000002a - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 99 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/__free - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i64.const 42 - i64.store - local.get $0 - v128.load64_zero - v128.const i32x4 0x00000000 0x00000000 0x0000002a 0x00000000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 109 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/__free - call $features/simd/test_i8x16 - call $features/simd/test_i16x8 - call $features/simd/test_i32x4 - v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x7fffffff - local.tee $2 - v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x7fffffff - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 538 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i64.const 1 - i64x2.splat - local.tee $3 - v128.const i32x4 0x00000001 0x00000000 0x00000001 0x00000000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 540 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $3 - i64x2.add - local.tee $1 - v128.const i32x4 0x00000002 0x00000000 0x00000000 0x80000000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 542 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $3 - i64x2.sub - local.get $2 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 543 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $3 - i64x2.mul - local.get $1 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 544 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i64x2.neg - v128.const i32x4 0xffffffff 0xffffffff 0x00000001 0x80000000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 545 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i64x2.extract_lane 0 - i64.const 2 - i64.ne - if - i32.const 0 - i32.const 1184 - i32.const 550 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i64x2.extract_lane 1 - i64.const -9223372036854775808 - i64.ne - if - i32.const 0 - i32.const 1184 - i32.const 551 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i64.const 3 - i64x2.replace_lane 1 - v128.const i32x4 0x00000002 0x00000000 0x00000003 0x00000000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 552 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $3 - i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - v128.const i32x4 0x00000001 0x00000000 0x00000001 0x00000000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 557 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $0 - i32.const 1 - i32.store - local.get $0 - i32.const -1 - i32.store offset=4 - local.get $0 - v128.load32x2_s align=4 - v128.const i32x4 0x00000001 0x00000000 0xffffffff 0xffffffff - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 571 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - v128.load32x2_u align=4 - v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x00000000 - i8x16.eq - i8x16.all_true - i32.eqz - if - i32.const 0 - i32.const 1184 - i32.const 576 - i32.const 5 + i32.const 109 + i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 call $~lib/rt/tlsf/__free - call $features/simd/test_f32x4 - call $features/simd/test_f64x2 + i32.const 0 + i32.const 1184 + i32.const 255 + i32.const 3 + call $~lib/builtins/abort + unreachable ) ) From d8d70ade6e2c159ce445de6fce184458dd03ff8a Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 20 Jul 2021 07:42:12 +0300 Subject: [PATCH 3/6] add simd test for q15mulr_sat_s --- tests/compiler/features/simd.ts | 6 +- tests/compiler/features/simd.untouched.wat | 173 +++++++++++---------- 2 files changed, 98 insertions(+), 81 deletions(-) diff --git a/tests/compiler/features/simd.ts b/tests/compiler/features/simd.ts index 82479c7825..2ecf07535c 100644 --- a/tests/compiler/features/simd.ts +++ b/tests/compiler/features/simd.ts @@ -393,11 +393,14 @@ function test_i16x8(): void { ); __free(ptr); } + assert(i16x8.q15mulr_sat_s( + i16x8(-1, -16383, 32765, 65535, -32768, 65535, -16385, -32768), + i16x8(-1, -16384, 1, -32768, -32768, 1, -16384, -10) + ) == i16x8(0, 8192, 1, 1, 32767, 0, 8193, 1)); // TODO: unimp in Binaryen's interpreter i16x8.extadd_pairwise_i8x16_s(a); i16x8.extadd_pairwise_i8x16_u(a); - i16x8.q15mulr_sat_s(a, a); i16x8.extmul_low_i8x16_s(a, a); i16x8.extmul_low_i8x16_u(a, a); i16x8.extmul_high_i8x16_s(a, a); @@ -580,6 +583,7 @@ function test_i64x2(): void { ); __free(ptr); } + // TODO: unimp in Binaryen's interpreter i64x2.extmul_low_i32x4_s(a, a); i64x2.extmul_low_i32x4_u(a, a); i64x2.extmul_high_i32x4_s(a, a); diff --git a/tests/compiler/features/simd.untouched.wat b/tests/compiler/features/simd.untouched.wat index fd46daeb69..aa67830fb4 100644 --- a/tests/compiler/features/simd.untouched.wat +++ b/tests/compiler/features/simd.untouched.wat @@ -2895,6 +2895,23 @@ end local.get $7 call $~lib/rt/tlsf/__free + v128.const i32x4 0xc001ffff 0xffff7ffd 0xffff8000 0x8000bfff + v128.const i32x4 0xc000ffff 0x80000001 0x00018000 0xfff6c000 + i16x8.q15mulr_sat_s + v128.const i32x4 0x20000000 0x00010001 0x00007fff 0x00012001 + i8x16.eq + i8x16.all_true + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 396 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 i16x8.extadd_pairwise_i8x16_s drop @@ -2903,10 +2920,6 @@ drop local.get $0 local.get $0 - i16x8.q15mulr_sat_s - drop - local.get $0 - local.get $0 i16x8.extmul_low_i8x16_s drop local.get $0 @@ -2943,7 +2956,7 @@ if i32.const 0 i32.const 160 - i32.const 409 + i32.const 412 i32.const 3 call $~lib/builtins/abort unreachable @@ -2961,7 +2974,7 @@ if i32.const 0 i32.const 160 - i32.const 411 + i32.const 414 i32.const 3 call $~lib/builtins/abort unreachable @@ -2980,7 +2993,7 @@ if i32.const 0 i32.const 160 - i32.const 413 + i32.const 416 i32.const 3 call $~lib/builtins/abort unreachable @@ -2997,7 +3010,7 @@ if i32.const 0 i32.const 160 - i32.const 414 + i32.const 417 i32.const 3 call $~lib/builtins/abort unreachable @@ -3014,7 +3027,7 @@ if i32.const 0 i32.const 160 - i32.const 415 + i32.const 418 i32.const 3 call $~lib/builtins/abort unreachable @@ -3075,7 +3088,7 @@ if i32.const 0 i32.const 160 - i32.const 456 + i32.const 459 i32.const 3 call $~lib/builtins/abort unreachable @@ -3088,7 +3101,7 @@ if i32.const 0 i32.const 160 - i32.const 461 + i32.const 464 i32.const 3 call $~lib/builtins/abort unreachable @@ -3101,7 +3114,7 @@ if i32.const 0 i32.const 160 - i32.const 462 + i32.const 465 i32.const 3 call $~lib/builtins/abort unreachable @@ -3118,7 +3131,7 @@ if i32.const 0 i32.const 160 - i32.const 463 + i32.const 466 i32.const 3 call $~lib/builtins/abort unreachable @@ -3135,7 +3148,7 @@ if i32.const 0 i32.const 160 - i32.const 468 + i32.const 471 i32.const 3 call $~lib/builtins/abort unreachable @@ -3215,7 +3228,7 @@ if i32.const 0 i32.const 160 - i32.const 482 + i32.const 485 i32.const 3 call $~lib/builtins/abort unreachable @@ -3232,7 +3245,7 @@ if i32.const 0 i32.const 160 - i32.const 483 + i32.const 486 i32.const 3 call $~lib/builtins/abort unreachable @@ -3249,7 +3262,7 @@ if i32.const 0 i32.const 160 - i32.const 484 + i32.const 487 i32.const 3 call $~lib/builtins/abort unreachable @@ -3266,7 +3279,7 @@ if i32.const 0 i32.const 160 - i32.const 485 + i32.const 488 i32.const 3 call $~lib/builtins/abort unreachable @@ -3283,7 +3296,7 @@ if i32.const 0 i32.const 160 - i32.const 486 + i32.const 489 i32.const 3 call $~lib/builtins/abort unreachable @@ -3300,7 +3313,7 @@ if i32.const 0 i32.const 160 - i32.const 487 + i32.const 490 i32.const 3 call $~lib/builtins/abort unreachable @@ -3317,7 +3330,7 @@ if i32.const 0 i32.const 160 - i32.const 488 + i32.const 491 i32.const 3 call $~lib/builtins/abort unreachable @@ -3334,7 +3347,7 @@ if i32.const 0 i32.const 160 - i32.const 489 + i32.const 492 i32.const 3 call $~lib/builtins/abort unreachable @@ -3351,7 +3364,7 @@ if i32.const 0 i32.const 160 - i32.const 490 + i32.const 493 i32.const 3 call $~lib/builtins/abort unreachable @@ -3368,7 +3381,7 @@ if i32.const 0 i32.const 160 - i32.const 491 + i32.const 494 i32.const 3 call $~lib/builtins/abort unreachable @@ -3467,7 +3480,7 @@ if i32.const 0 i32.const 160 - i32.const 512 + i32.const 515 i32.const 5 call $~lib/builtins/abort unreachable @@ -3483,7 +3496,7 @@ if i32.const 0 i32.const 160 - i32.const 517 + i32.const 520 i32.const 5 call $~lib/builtins/abort unreachable @@ -3536,7 +3549,7 @@ if i32.const 0 i32.const 160 - i32.const 538 + i32.const 541 i32.const 3 call $~lib/builtins/abort unreachable @@ -3554,7 +3567,7 @@ if i32.const 0 i32.const 160 - i32.const 540 + i32.const 543 i32.const 3 call $~lib/builtins/abort unreachable @@ -3573,7 +3586,7 @@ if i32.const 0 i32.const 160 - i32.const 542 + i32.const 545 i32.const 3 call $~lib/builtins/abort unreachable @@ -3590,7 +3603,7 @@ if i32.const 0 i32.const 160 - i32.const 543 + i32.const 546 i32.const 3 call $~lib/builtins/abort unreachable @@ -3607,7 +3620,7 @@ if i32.const 0 i32.const 160 - i32.const 544 + i32.const 547 i32.const 3 call $~lib/builtins/abort unreachable @@ -3623,7 +3636,7 @@ if i32.const 0 i32.const 160 - i32.const 545 + i32.const 548 i32.const 3 call $~lib/builtins/abort unreachable @@ -3636,7 +3649,7 @@ if i32.const 0 i32.const 160 - i32.const 550 + i32.const 553 i32.const 3 call $~lib/builtins/abort unreachable @@ -3649,7 +3662,7 @@ if i32.const 0 i32.const 160 - i32.const 551 + i32.const 554 i32.const 3 call $~lib/builtins/abort unreachable @@ -3666,7 +3679,7 @@ if i32.const 0 i32.const 160 - i32.const 552 + i32.const 555 i32.const 3 call $~lib/builtins/abort unreachable @@ -3683,7 +3696,7 @@ if i32.const 0 i32.const 160 - i32.const 557 + i32.const 560 i32.const 3 call $~lib/builtins/abort unreachable @@ -3756,7 +3769,7 @@ if i32.const 0 i32.const 160 - i32.const 571 + i32.const 574 i32.const 5 call $~lib/builtins/abort unreachable @@ -3772,7 +3785,7 @@ if i32.const 0 i32.const 160 - i32.const 576 + i32.const 579 i32.const 5 call $~lib/builtins/abort unreachable @@ -3817,7 +3830,7 @@ if i32.const 0 i32.const 160 - i32.const 591 + i32.const 595 i32.const 3 call $~lib/builtins/abort unreachable @@ -3835,7 +3848,7 @@ if i32.const 0 i32.const 160 - i32.const 593 + i32.const 597 i32.const 3 call $~lib/builtins/abort unreachable @@ -3854,7 +3867,7 @@ if i32.const 0 i32.const 160 - i32.const 595 + i32.const 599 i32.const 3 call $~lib/builtins/abort unreachable @@ -3871,7 +3884,7 @@ if i32.const 0 i32.const 160 - i32.const 596 + i32.const 600 i32.const 3 call $~lib/builtins/abort unreachable @@ -3888,7 +3901,7 @@ if i32.const 0 i32.const 160 - i32.const 597 + i32.const 601 i32.const 3 call $~lib/builtins/abort unreachable @@ -3909,7 +3922,7 @@ if i32.const 0 i32.const 160 - i32.const 599 + i32.const 603 i32.const 3 call $~lib/builtins/abort unreachable @@ -3926,7 +3939,7 @@ if i32.const 0 i32.const 160 - i32.const 600 + i32.const 604 i32.const 3 call $~lib/builtins/abort unreachable @@ -3942,7 +3955,7 @@ if i32.const 0 i32.const 160 - i32.const 601 + i32.const 605 i32.const 3 call $~lib/builtins/abort unreachable @@ -3955,7 +3968,7 @@ if i32.const 0 i32.const 160 - i32.const 602 + i32.const 606 i32.const 3 call $~lib/builtins/abort unreachable @@ -3968,7 +3981,7 @@ if i32.const 0 i32.const 160 - i32.const 603 + i32.const 607 i32.const 3 call $~lib/builtins/abort unreachable @@ -3985,7 +3998,7 @@ if i32.const 0 i32.const 160 - i32.const 604 + i32.const 608 i32.const 3 call $~lib/builtins/abort unreachable @@ -4002,7 +4015,7 @@ if i32.const 0 i32.const 160 - i32.const 609 + i32.const 613 i32.const 3 call $~lib/builtins/abort unreachable @@ -4033,7 +4046,7 @@ if i32.const 0 i32.const 160 - i32.const 618 + i32.const 622 i32.const 3 call $~lib/builtins/abort unreachable @@ -4050,7 +4063,7 @@ if i32.const 0 i32.const 160 - i32.const 619 + i32.const 623 i32.const 3 call $~lib/builtins/abort unreachable @@ -4067,7 +4080,7 @@ if i32.const 0 i32.const 160 - i32.const 620 + i32.const 624 i32.const 3 call $~lib/builtins/abort unreachable @@ -4084,7 +4097,7 @@ if i32.const 0 i32.const 160 - i32.const 621 + i32.const 625 i32.const 3 call $~lib/builtins/abort unreachable @@ -4101,7 +4114,7 @@ if i32.const 0 i32.const 160 - i32.const 622 + i32.const 626 i32.const 3 call $~lib/builtins/abort unreachable @@ -4118,7 +4131,7 @@ if i32.const 0 i32.const 160 - i32.const 623 + i32.const 627 i32.const 3 call $~lib/builtins/abort unreachable @@ -4135,7 +4148,7 @@ if i32.const 0 i32.const 160 - i32.const 624 + i32.const 628 i32.const 3 call $~lib/builtins/abort unreachable @@ -4152,7 +4165,7 @@ if i32.const 0 i32.const 160 - i32.const 625 + i32.const 629 i32.const 3 call $~lib/builtins/abort unreachable @@ -4168,7 +4181,7 @@ if i32.const 0 i32.const 160 - i32.const 626 + i32.const 630 i32.const 3 call $~lib/builtins/abort unreachable @@ -4226,7 +4239,7 @@ if i32.const 0 i32.const 160 - i32.const 645 + i32.const 649 i32.const 3 call $~lib/builtins/abort unreachable @@ -4244,7 +4257,7 @@ if i32.const 0 i32.const 160 - i32.const 647 + i32.const 651 i32.const 3 call $~lib/builtins/abort unreachable @@ -4263,7 +4276,7 @@ if i32.const 0 i32.const 160 - i32.const 649 + i32.const 653 i32.const 3 call $~lib/builtins/abort unreachable @@ -4280,7 +4293,7 @@ if i32.const 0 i32.const 160 - i32.const 650 + i32.const 654 i32.const 3 call $~lib/builtins/abort unreachable @@ -4297,7 +4310,7 @@ if i32.const 0 i32.const 160 - i32.const 651 + i32.const 655 i32.const 3 call $~lib/builtins/abort unreachable @@ -4318,7 +4331,7 @@ if i32.const 0 i32.const 160 - i32.const 653 + i32.const 657 i32.const 3 call $~lib/builtins/abort unreachable @@ -4335,7 +4348,7 @@ if i32.const 0 i32.const 160 - i32.const 654 + i32.const 658 i32.const 3 call $~lib/builtins/abort unreachable @@ -4351,7 +4364,7 @@ if i32.const 0 i32.const 160 - i32.const 655 + i32.const 659 i32.const 3 call $~lib/builtins/abort unreachable @@ -4364,7 +4377,7 @@ if i32.const 0 i32.const 160 - i32.const 656 + i32.const 660 i32.const 3 call $~lib/builtins/abort unreachable @@ -4377,7 +4390,7 @@ if i32.const 0 i32.const 160 - i32.const 657 + i32.const 661 i32.const 3 call $~lib/builtins/abort unreachable @@ -4394,7 +4407,7 @@ if i32.const 0 i32.const 160 - i32.const 658 + i32.const 662 i32.const 3 call $~lib/builtins/abort unreachable @@ -4411,7 +4424,7 @@ if i32.const 0 i32.const 160 - i32.const 663 + i32.const 667 i32.const 3 call $~lib/builtins/abort unreachable @@ -4442,7 +4455,7 @@ if i32.const 0 i32.const 160 - i32.const 672 + i32.const 676 i32.const 3 call $~lib/builtins/abort unreachable @@ -4459,7 +4472,7 @@ if i32.const 0 i32.const 160 - i32.const 673 + i32.const 677 i32.const 3 call $~lib/builtins/abort unreachable @@ -4476,7 +4489,7 @@ if i32.const 0 i32.const 160 - i32.const 674 + i32.const 678 i32.const 3 call $~lib/builtins/abort unreachable @@ -4493,7 +4506,7 @@ if i32.const 0 i32.const 160 - i32.const 675 + i32.const 679 i32.const 3 call $~lib/builtins/abort unreachable @@ -4510,7 +4523,7 @@ if i32.const 0 i32.const 160 - i32.const 676 + i32.const 680 i32.const 3 call $~lib/builtins/abort unreachable @@ -4527,7 +4540,7 @@ if i32.const 0 i32.const 160 - i32.const 677 + i32.const 681 i32.const 3 call $~lib/builtins/abort unreachable @@ -4544,7 +4557,7 @@ if i32.const 0 i32.const 160 - i32.const 678 + i32.const 682 i32.const 3 call $~lib/builtins/abort unreachable @@ -4561,7 +4574,7 @@ if i32.const 0 i32.const 160 - i32.const 679 + i32.const 683 i32.const 3 call $~lib/builtins/abort unreachable @@ -4577,7 +4590,7 @@ if i32.const 0 i32.const 160 - i32.const 680 + i32.const 684 i32.const 3 call $~lib/builtins/abort unreachable From 1b9e2db919cb6efcd7a557b480a1277ddaf2bac9 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 21 Jul 2021 05:47:59 +0300 Subject: [PATCH 4/6] update again --- package-lock.json | 14 +++++++------- package.json | 2 +- tests/compiler/std/array.optimized.wat | 3 +-- tests/compiler/std/typedarray.optimized.wat | 3 +-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 66d0fa4b37..d8686ff85f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "101.0.0-nightly.20210720", + "binaryen": "101.0.0-nightly.20210721", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" @@ -732,9 +732,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "101.0.0-nightly.20210720", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210720.tgz", - "integrity": "sha512-7Y2V2S60j+/YiAL0K/QL5ZKRrjkgq6AwduCswF989BXP/YHfRSshmZDLexrzqT3XV8roA4oeRK3IyV6iPAGRSg==", + "version": "101.0.0-nightly.20210721", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210721.tgz", + "integrity": "sha512-sGwQWQxmf7jbfy76LT4U3Ndks6EYizyLLHoZ0+wqw5iWpStXFyDpUntHnZppqSNuYTUnzBE02jton65i5mHqYA==", "bin": { "wasm-opt": "bin/wasm-opt" } @@ -3497,9 +3497,9 @@ "dev": true }, "binaryen": { - "version": "101.0.0-nightly.20210720", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210720.tgz", - "integrity": "sha512-7Y2V2S60j+/YiAL0K/QL5ZKRrjkgq6AwduCswF989BXP/YHfRSshmZDLexrzqT3XV8roA4oeRK3IyV6iPAGRSg==" + "version": "101.0.0-nightly.20210721", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210721.tgz", + "integrity": "sha512-sGwQWQxmf7jbfy76LT4U3Ndks6EYizyLLHoZ0+wqw5iWpStXFyDpUntHnZppqSNuYTUnzBE02jton65i5mHqYA==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index f7df6d76b4..170ea3e871 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "101.0.0-nightly.20210720", + "binaryen": "101.0.0-nightly.20210721", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 9ac2fe215c..5c0eda65ba 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -26007,8 +26007,7 @@ if local.get $5 i64.load - i32.wrap_i64 - i64.extend_i32_s + i64.extend32_s local.set $9 global.get $~lib/memory/__stack_pointer i32.const 4 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 919a50358b..ca23593edd 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -25808,8 +25808,7 @@ if local.get $4 i64.load - i32.wrap_i64 - i64.extend_i32_s + i64.extend32_s local.set $2 global.get $~lib/memory/__stack_pointer i32.const 4 From 42f3e57d58aabe2c432f847fe578ae29e4926704 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 22 Jul 2021 06:44:17 +0300 Subject: [PATCH 5/6] update --- package-lock.json | 14 +++++++------- package.json | 2 +- tests/compiler/std/math.optimized.wat | 9 +++------ tests/compiler/wasi/seed.optimized.wat | 11 ++++------- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index d8686ff85f..120036769d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "101.0.0-nightly.20210721", + "binaryen": "101.0.0-nightly.20210722", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" @@ -732,9 +732,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "101.0.0-nightly.20210721", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210721.tgz", - "integrity": "sha512-sGwQWQxmf7jbfy76LT4U3Ndks6EYizyLLHoZ0+wqw5iWpStXFyDpUntHnZppqSNuYTUnzBE02jton65i5mHqYA==", + "version": "101.0.0-nightly.20210722", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210722.tgz", + "integrity": "sha512-lhorzOPyP49d1wvwpZ08AucIp2APiIwhY9CRDgzAjx0vbSuPXUPxwQAJ73A14r66Hg/DBqFipHKRDsLxukvlwg==", "bin": { "wasm-opt": "bin/wasm-opt" } @@ -3497,9 +3497,9 @@ "dev": true }, "binaryen": { - "version": "101.0.0-nightly.20210721", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210721.tgz", - "integrity": "sha512-sGwQWQxmf7jbfy76LT4U3Ndks6EYizyLLHoZ0+wqw5iWpStXFyDpUntHnZppqSNuYTUnzBE02jton65i5mHqYA==" + "version": "101.0.0-nightly.20210722", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210722.tgz", + "integrity": "sha512-lhorzOPyP49d1wvwpZ08AucIp2APiIwhY9CRDgzAjx0vbSuPXUPxwQAJ73A14r66Hg/DBqFipHKRDsLxukvlwg==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index 170ea3e871..457b71b403 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "101.0.0-nightly.20210721", + "binaryen": "101.0.0-nightly.20210722", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 2e5c82ed14..646c4aeba9 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -5136,8 +5136,7 @@ f64.mul local.set $2 local.get $7 - i64.load - f64.reinterpret_i64 + f64.load local.get $0 f64.add local.get $2 @@ -5839,8 +5838,7 @@ f64.mul local.set $6 local.get $9 - i64.load - f64.reinterpret_i64 + f64.load local.get $0 f64.const 0.6931471805599453 f64.mul @@ -8164,8 +8162,7 @@ f64.mul local.set $0 local.get $10 - i64.load - f64.reinterpret_i64 + f64.load local.get $1 f64.add local.get $0 diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index 8506c078fe..e24aed1e12 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -299,7 +299,7 @@ if i32.const 0 i64.load - local.set $2 + local.set $1 loop $do-continue|0 i32.const 0 i32.const 8 @@ -307,19 +307,16 @@ drop i32.const 0 i64.load - local.tee $1 + local.tee $2 i64.eqz br_if $do-continue|0 end i32.const 0 - local.get $2 + local.get $1 i64.store i32.const 1 global.set $~lib/math/random_seeded - local.get $1 - f64.reinterpret_i64 - i64.reinterpret_f64 - local.tee $2 + local.get $2 local.get $2 i64.const 33 i64.shr_u From 512032bf8a4d20ab09ec0269c6dabf6b31b954f7 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 23 Jul 2021 07:28:28 +0300 Subject: [PATCH 6/6] update --- package-lock.json | 14 +++++------ package.json | 2 +- .../features/reference-types.untouched.wat | 24 ++++++++++--------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 120036769d..403438e4fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "binaryen": "101.0.0-nightly.20210722", + "binaryen": "101.0.0-nightly.20210723", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" @@ -732,9 +732,9 @@ "dev": true }, "node_modules/binaryen": { - "version": "101.0.0-nightly.20210722", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210722.tgz", - "integrity": "sha512-lhorzOPyP49d1wvwpZ08AucIp2APiIwhY9CRDgzAjx0vbSuPXUPxwQAJ73A14r66Hg/DBqFipHKRDsLxukvlwg==", + "version": "101.0.0-nightly.20210723", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210723.tgz", + "integrity": "sha512-eioJNqhHlkguVSbblHOtLqlhtC882SOEPKmNFZaDuz1hzQjolxZ+eu3/kaS10n3sGPONsIZsO7R9fR00UyhEUA==", "bin": { "wasm-opt": "bin/wasm-opt" } @@ -3497,9 +3497,9 @@ "dev": true }, "binaryen": { - "version": "101.0.0-nightly.20210722", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210722.tgz", - "integrity": "sha512-lhorzOPyP49d1wvwpZ08AucIp2APiIwhY9CRDgzAjx0vbSuPXUPxwQAJ73A14r66Hg/DBqFipHKRDsLxukvlwg==" + "version": "101.0.0-nightly.20210723", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-101.0.0-nightly.20210723.tgz", + "integrity": "sha512-eioJNqhHlkguVSbblHOtLqlhtC882SOEPKmNFZaDuz1hzQjolxZ+eu3/kaS10n3sGPONsIZsO7R9fR00UyhEUA==" }, "brace-expansion": { "version": "1.1.11", diff --git a/package.json b/package.json index 457b71b403..3567e682e3 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "101.0.0-nightly.20210722", + "binaryen": "101.0.0-nightly.20210723", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" diff --git a/tests/compiler/features/reference-types.untouched.wat b/tests/compiler/features/reference-types.untouched.wat index 2d1c5e28d6..593b403ef2 100644 --- a/tests/compiler/features/reference-types.untouched.wat +++ b/tests/compiler/features/reference-types.untouched.wat @@ -426,17 +426,19 @@ call $~lib/builtins/abort unreachable end - ref.func $features/reference-types/someFunc - local.set $0 - local.get $0 - ref.is_null - if - i32.const 0 - i32.const 32 - i32.const 113 - i32.const 3 - call $~lib/builtins/abort - unreachable + block + ref.func $features/reference-types/someFunc + local.set $0 + local.get $0 + ref.is_null + if + i32.const 0 + i32.const 32 + i32.const 113 + i32.const 3 + call $~lib/builtins/abort + unreachable + end end global.get $features/reference-types/funcGlobal global.set $features/reference-types/anyGlobal