summaryrefslogtreecommitdiff
path: root/test/wasm2js/endianness.2asm.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-04-19 15:22:55 -0700
committerGitHub <noreply@github.com>2019-04-19 15:22:55 -0700
commitdb14d0477f2715e3071687f42b77d8712477d83e (patch)
tree7cb4f679bfc18cbb7d4a87db0b3d5a02f6bcaeed /test/wasm2js/endianness.2asm.js
parenta4baf2152d11c28964025759d2702fe7c48d321e (diff)
downloadbinaryen-db14d0477f2715e3071687f42b77d8712477d83e.tar.gz
binaryen-db14d0477f2715e3071687f42b77d8712477d83e.tar.bz2
binaryen-db14d0477f2715e3071687f42b77d8712477d83e.zip
wasm2js2 import fixes (#2031)
* Don't assume function types exist in legalize-js-interface. * Properly handle (ignore) imports in RemoveNonJSOps - do not try to recurse into them. * Run legalize-js-interface and remove-unused-module-elements in wasm2js, the first is necessary, the last is nice to have.
Diffstat (limited to 'test/wasm2js/endianness.2asm.js')
-rw-r--r--test/wasm2js/endianness.2asm.js458
1 files changed, 447 insertions, 11 deletions
diff --git a/test/wasm2js/endianness.2asm.js b/test/wasm2js/endianness.2asm.js
index d5150fc19..d25be1329 100644
--- a/test/wasm2js/endianness.2asm.js
+++ b/test/wasm2js/endianness.2asm.js
@@ -1,4 +1,5 @@
import { __tempMemory__ } from 'env';
+import { setTempRet0 } from 'env';
function asmFunc(global, env, buffer) {
"almost asm";
@@ -22,6 +23,7 @@ function asmFunc(global, env, buffer) {
var abort = env.abort;
var nan = global.NaN;
var infinity = global.Infinity;
+ var setTempRet0 = env.setTempRet0;
var __tempMemory__ = env.__tempMemory__ | 0;
var i64toi32_i32$HIGH_BITS = 0;
function i16_store_little(address, value) {
@@ -298,6 +300,440 @@ function asmFunc(global, env, buffer) {
return +(+HEAPF64[__tempMemory__ >> 3]);
}
+ function legalstub$9($0, $1) {
+ $0 = $0 | 0;
+ $1 = $1 | 0;
+ var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12_1 = 0, $13_1 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0;
+ i64toi32_i32$0 = 0;
+ $4 = $0;
+ $4$hi = i64toi32_i32$0;
+ i64toi32_i32$0 = 0;
+ i64toi32_i32$2 = $1;
+ i64toi32_i32$1 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ $12_1 = 0;
+ }
+ } else {
+ {
+ i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0;
+ $12_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ }
+ }
+ $7$hi = i64toi32_i32$1;
+ i64toi32_i32$1 = $4$hi;
+ i64toi32_i32$0 = $4;
+ i64toi32_i32$2 = $7$hi;
+ i64toi32_i32$3 = $12_1;
+ i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0;
+ i64toi32_i32$2 = $9(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0;
+ i64toi32_i32$0 = i64toi32_i32$HIGH_BITS;
+ $2 = i64toi32_i32$2;
+ $2$hi = i64toi32_i32$0;
+ i64toi32_i32$1 = i64toi32_i32$2;
+ i64toi32_i32$2 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$2 = 0;
+ $13_1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ }
+ } else {
+ {
+ i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ $13_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0;
+ }
+ }
+ setTempRet0($13_1 | 0);
+ i64toi32_i32$2 = $2$hi;
+ return $2 | 0;
+ }
+
+ function legalstub$10($0, $1) {
+ $0 = $0 | 0;
+ $1 = $1 | 0;
+ var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12_1 = 0, $13_1 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0;
+ i64toi32_i32$0 = 0;
+ $4 = $0;
+ $4$hi = i64toi32_i32$0;
+ i64toi32_i32$0 = 0;
+ i64toi32_i32$2 = $1;
+ i64toi32_i32$1 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ $12_1 = 0;
+ }
+ } else {
+ {
+ i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0;
+ $12_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ }
+ }
+ $7$hi = i64toi32_i32$1;
+ i64toi32_i32$1 = $4$hi;
+ i64toi32_i32$0 = $4;
+ i64toi32_i32$2 = $7$hi;
+ i64toi32_i32$3 = $12_1;
+ i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0;
+ i64toi32_i32$2 = $10(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0;
+ i64toi32_i32$0 = i64toi32_i32$HIGH_BITS;
+ $2 = i64toi32_i32$2;
+ $2$hi = i64toi32_i32$0;
+ i64toi32_i32$1 = i64toi32_i32$2;
+ i64toi32_i32$2 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$2 = 0;
+ $13_1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ }
+ } else {
+ {
+ i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ $13_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0;
+ }
+ }
+ setTempRet0($13_1 | 0);
+ i64toi32_i32$2 = $2$hi;
+ return $2 | 0;
+ }
+
+ function legalstub$11($0, $1) {
+ $0 = $0 | 0;
+ $1 = $1 | 0;
+ var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12_1 = 0, $13_1 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0;
+ i64toi32_i32$0 = 0;
+ $4 = $0;
+ $4$hi = i64toi32_i32$0;
+ i64toi32_i32$0 = 0;
+ i64toi32_i32$2 = $1;
+ i64toi32_i32$1 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ $12_1 = 0;
+ }
+ } else {
+ {
+ i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0;
+ $12_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ }
+ }
+ $7$hi = i64toi32_i32$1;
+ i64toi32_i32$1 = $4$hi;
+ i64toi32_i32$0 = $4;
+ i64toi32_i32$2 = $7$hi;
+ i64toi32_i32$3 = $12_1;
+ i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0;
+ i64toi32_i32$2 = $11(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0;
+ i64toi32_i32$0 = i64toi32_i32$HIGH_BITS;
+ $2 = i64toi32_i32$2;
+ $2$hi = i64toi32_i32$0;
+ i64toi32_i32$1 = i64toi32_i32$2;
+ i64toi32_i32$2 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$2 = 0;
+ $13_1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ }
+ } else {
+ {
+ i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ $13_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0;
+ }
+ }
+ setTempRet0($13_1 | 0);
+ i64toi32_i32$2 = $2$hi;
+ return $2 | 0;
+ }
+
+ function legalstub$12($0, $1) {
+ $0 = $0 | 0;
+ $1 = $1 | 0;
+ var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12_1 = 0, $13_1 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0;
+ i64toi32_i32$0 = 0;
+ $4 = $0;
+ $4$hi = i64toi32_i32$0;
+ i64toi32_i32$0 = 0;
+ i64toi32_i32$2 = $1;
+ i64toi32_i32$1 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ $12_1 = 0;
+ }
+ } else {
+ {
+ i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0;
+ $12_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ }
+ }
+ $7$hi = i64toi32_i32$1;
+ i64toi32_i32$1 = $4$hi;
+ i64toi32_i32$0 = $4;
+ i64toi32_i32$2 = $7$hi;
+ i64toi32_i32$3 = $12_1;
+ i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0;
+ i64toi32_i32$2 = $12(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0;
+ i64toi32_i32$0 = i64toi32_i32$HIGH_BITS;
+ $2 = i64toi32_i32$2;
+ $2$hi = i64toi32_i32$0;
+ i64toi32_i32$1 = i64toi32_i32$2;
+ i64toi32_i32$2 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$2 = 0;
+ $13_1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ }
+ } else {
+ {
+ i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ $13_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0;
+ }
+ }
+ setTempRet0($13_1 | 0);
+ i64toi32_i32$2 = $2$hi;
+ return $2 | 0;
+ }
+
+ function legalstub$13($0, $1) {
+ $0 = $0 | 0;
+ $1 = $1 | 0;
+ var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12_1 = 0, $13_1 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0;
+ i64toi32_i32$0 = 0;
+ $4 = $0;
+ $4$hi = i64toi32_i32$0;
+ i64toi32_i32$0 = 0;
+ i64toi32_i32$2 = $1;
+ i64toi32_i32$1 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ $12_1 = 0;
+ }
+ } else {
+ {
+ i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0;
+ $12_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ }
+ }
+ $7$hi = i64toi32_i32$1;
+ i64toi32_i32$1 = $4$hi;
+ i64toi32_i32$0 = $4;
+ i64toi32_i32$2 = $7$hi;
+ i64toi32_i32$3 = $12_1;
+ i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0;
+ i64toi32_i32$2 = $13(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0;
+ i64toi32_i32$0 = i64toi32_i32$HIGH_BITS;
+ $2 = i64toi32_i32$2;
+ $2$hi = i64toi32_i32$0;
+ i64toi32_i32$1 = i64toi32_i32$2;
+ i64toi32_i32$2 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$2 = 0;
+ $13_1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ }
+ } else {
+ {
+ i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ $13_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0;
+ }
+ }
+ setTempRet0($13_1 | 0);
+ i64toi32_i32$2 = $2$hi;
+ return $2 | 0;
+ }
+
+ function legalstub$14($0) {
+ $0 = +$0;
+ return +(+Math_fround($14(Math_fround(Math_fround($0)))));
+ }
+
+ function legalstub$18($0, $1) {
+ $0 = $0 | 0;
+ $1 = $1 | 0;
+ var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12_1 = 0, $13_1 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0;
+ i64toi32_i32$0 = 0;
+ $4 = $0;
+ $4$hi = i64toi32_i32$0;
+ i64toi32_i32$0 = 0;
+ i64toi32_i32$2 = $1;
+ i64toi32_i32$1 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ $12_1 = 0;
+ }
+ } else {
+ {
+ i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0;
+ $12_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ }
+ }
+ $7$hi = i64toi32_i32$1;
+ i64toi32_i32$1 = $4$hi;
+ i64toi32_i32$0 = $4;
+ i64toi32_i32$2 = $7$hi;
+ i64toi32_i32$3 = $12_1;
+ i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0;
+ i64toi32_i32$2 = $18(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0;
+ i64toi32_i32$0 = i64toi32_i32$HIGH_BITS;
+ $2 = i64toi32_i32$2;
+ $2$hi = i64toi32_i32$0;
+ i64toi32_i32$1 = i64toi32_i32$2;
+ i64toi32_i32$2 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$2 = 0;
+ $13_1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ }
+ } else {
+ {
+ i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ $13_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0;
+ }
+ }
+ setTempRet0($13_1 | 0);
+ i64toi32_i32$2 = $2$hi;
+ return $2 | 0;
+ }
+
+ function legalstub$19($0, $1) {
+ $0 = $0 | 0;
+ $1 = $1 | 0;
+ var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12_1 = 0, $13_1 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0;
+ i64toi32_i32$0 = 0;
+ $4 = $0;
+ $4$hi = i64toi32_i32$0;
+ i64toi32_i32$0 = 0;
+ i64toi32_i32$2 = $1;
+ i64toi32_i32$1 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ $12_1 = 0;
+ }
+ } else {
+ {
+ i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0;
+ $12_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ }
+ }
+ $7$hi = i64toi32_i32$1;
+ i64toi32_i32$1 = $4$hi;
+ i64toi32_i32$0 = $4;
+ i64toi32_i32$2 = $7$hi;
+ i64toi32_i32$3 = $12_1;
+ i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0;
+ i64toi32_i32$2 = $19(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0;
+ i64toi32_i32$0 = i64toi32_i32$HIGH_BITS;
+ $2 = i64toi32_i32$2;
+ $2$hi = i64toi32_i32$0;
+ i64toi32_i32$1 = i64toi32_i32$2;
+ i64toi32_i32$2 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$2 = 0;
+ $13_1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ }
+ } else {
+ {
+ i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ $13_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0;
+ }
+ }
+ setTempRet0($13_1 | 0);
+ i64toi32_i32$2 = $2$hi;
+ return $2 | 0;
+ }
+
+ function legalstub$20($0, $1) {
+ $0 = $0 | 0;
+ $1 = $1 | 0;
+ var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $12_1 = 0, $13_1 = 0, $4 = 0, $4$hi = 0, $7$hi = 0, $2 = 0, $2$hi = 0;
+ i64toi32_i32$0 = 0;
+ $4 = $0;
+ $4$hi = i64toi32_i32$0;
+ i64toi32_i32$0 = 0;
+ i64toi32_i32$2 = $1;
+ i64toi32_i32$1 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ $12_1 = 0;
+ }
+ } else {
+ {
+ i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0;
+ $12_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0;
+ }
+ }
+ $7$hi = i64toi32_i32$1;
+ i64toi32_i32$1 = $4$hi;
+ i64toi32_i32$0 = $4;
+ i64toi32_i32$2 = $7$hi;
+ i64toi32_i32$3 = $12_1;
+ i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0;
+ i64toi32_i32$2 = $20(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0;
+ i64toi32_i32$0 = i64toi32_i32$HIGH_BITS;
+ $2 = i64toi32_i32$2;
+ $2$hi = i64toi32_i32$0;
+ i64toi32_i32$1 = i64toi32_i32$2;
+ i64toi32_i32$2 = 0;
+ i64toi32_i32$3 = 32;
+ i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0;
+ if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) {
+ {
+ i64toi32_i32$2 = 0;
+ $13_1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ }
+ } else {
+ {
+ i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0;
+ $13_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0;
+ }
+ }
+ setTempRet0($13_1 | 0);
+ i64toi32_i32$2 = $2$hi;
+ return $2 | 0;
+ }
+
+ function legalstub$21($0) {
+ $0 = +$0;
+ return +(+Math_fround($21(Math_fround(Math_fround($0)))));
+ }
+
var FUNCTION_TABLE = [];
function __wasm_grow_memory(pagesToAdd) {
pagesToAdd = pagesToAdd | 0;
@@ -330,25 +766,25 @@ function asmFunc(global, env, buffer) {
i32_load16_s: $6,
i32_load16_u: $7,
i32_load: $8,
- i64_load16_s: $9,
- i64_load16_u: $10,
- i64_load32_s: $11,
- i64_load32_u: $12,
- i64_load: $13,
- f32_load: $14,
+ i64_load16_s: legalstub$9,
+ i64_load16_u: legalstub$10,
+ i64_load32_s: legalstub$11,
+ i64_load32_u: legalstub$12,
+ i64_load: legalstub$13,
+ f32_load: legalstub$14,
f64_load: $15,
i32_store16: $16,
i32_store: $17,
- i64_store16: $18,
- i64_store32: $19,
- i64_store: $20,
- f32_store: $21,
+ i64_store16: legalstub$18,
+ i64_store32: legalstub$19,
+ i64_store: legalstub$20,
+ f32_store: legalstub$21,
f64_store: $22
};
}
const memasmFunc = new ArrayBuffer(65536);
-const retasmFunc = asmFunc({Math,Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,NaN,Infinity}, {abort:function() { throw new Error('abort'); }},memasmFunc);
+const retasmFunc = asmFunc({Math,Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,NaN,Infinity}, {abort:function() { throw new Error('abort'); },setTempRet0},memasmFunc);
export const i32_load16_s = retasmFunc.i32_load16_s;
export const i32_load16_u = retasmFunc.i32_load16_u;
export const i32_load = retasmFunc.i32_load;