diff options
Diffstat (limited to 'test/address.2asm.js')
-rw-r--r-- | test/address.2asm.js | 143 |
1 files changed, 117 insertions, 26 deletions
diff --git a/test/address.2asm.js b/test/address.2asm.js index b2c78fca9..8dfe2dce9 100644 --- a/test/address.2asm.js +++ b/test/address.2asm.js @@ -15,62 +15,153 @@ function asmFunc(global, env, buffer) { var print = env.print; function $$0(i) { i = i | 0; - var wasm2asm_i32$0 = 0; - print(HEAPU8[i >> 0] | 0 | 0); - print(HEAPU8[(i + 1 | 0) >> 0] | 0 | 0); - print(HEAPU8[(i + 2 | 0) >> 0] | 0 | 0); - print(HEAPU8[(i + 25 | 0) >> 0] | 0 | 0); - print(HEAPU16[i >> 1] | 0 | 0); - print((wasm2asm_i32$0 = i, HEAPU8[wasm2asm_i32$0 >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 1 | 0) >> 0] | 0 | 0) << 8) | 0); - print((wasm2asm_i32$0 = i, HEAPU8[(wasm2asm_i32$0 + 1 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 2 | 0) >> 0] | 0 | 0) << 8) | 0); - print(HEAPU16[(i + 2 | 0) >> 1] | 0 | 0); - print((wasm2asm_i32$0 = i, HEAPU8[(wasm2asm_i32$0 + 25 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 26 | 0) >> 0] | 0 | 0) << 8) | 0); - print(HEAPU32[i >> 2] | 0 | 0); - print((wasm2asm_i32$0 = i, HEAPU8[(wasm2asm_i32$0 + 1 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 2 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2asm_i32$0 + 3 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2asm_i32$0 + 4 | 0) >> 0] | 0 | 0) << 24) | 0); - print((wasm2asm_i32$0 = i, HEAPU8[(wasm2asm_i32$0 + 2 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 3 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2asm_i32$0 + 4 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2asm_i32$0 + 5 | 0) >> 0] | 0 | 0) << 24) | 0); - print((wasm2asm_i32$0 = i, HEAPU8[(wasm2asm_i32$0 + 25 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 26 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2asm_i32$0 + 27 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2asm_i32$0 + 28 | 0) >> 0] | 0 | 0) << 24) | 0); + var $$1 = 0, $$2 = 0, $$3 = 0, $$4 = 0, $$5 = 0, $$6 = 0, $$7 = 0, $$8 = 0, $$9 = 0, $$10 = 0, $$11 = 0, $$12 = 0, $$13 = 0, $$14 = 0, $$15 = 0, $$16 = 0, $$17 = 0, $$18 = 0, $$19 = 0, $$20 = 0, $$21 = 0, $$22 = 0, $$23 = 0, $$24 = 0, $$25 = 0, $$26 = 0, wasm2asm_i32$0 = 0; + $$1 = i; + $$2 = HEAPU8[$$1 >> 0] | 0; + print($$2 | 0); + $$3 = i; + $$4 = HEAPU8[($$3 + 1 | 0) >> 0] | 0; + print($$4 | 0); + $$5 = i; + $$6 = HEAPU8[($$5 + 2 | 0) >> 0] | 0; + print($$6 | 0); + $$7 = i; + $$8 = HEAPU8[($$7 + 25 | 0) >> 0] | 0; + print($$8 | 0); + $$9 = i; + $$10 = HEAPU16[$$9 >> 1] | 0; + print($$10 | 0); + $$11 = i; + $$12 = (wasm2asm_i32$0 = $$11, HEAPU8[wasm2asm_i32$0 >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 1 | 0) >> 0] | 0 | 0) << 8); + print($$12 | 0); + $$13 = i; + $$14 = (wasm2asm_i32$0 = $$13, HEAPU8[(wasm2asm_i32$0 + 1 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 2 | 0) >> 0] | 0 | 0) << 8); + print($$14 | 0); + $$15 = i; + $$16 = HEAPU16[($$15 + 2 | 0) >> 1] | 0; + print($$16 | 0); + $$17 = i; + $$18 = (wasm2asm_i32$0 = $$17, HEAPU8[(wasm2asm_i32$0 + 25 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 26 | 0) >> 0] | 0 | 0) << 8); + print($$18 | 0); + $$19 = i; + $$20 = HEAPU32[$$19 >> 2] | 0; + print($$20 | 0); + $$21 = i; + $$22 = (wasm2asm_i32$0 = $$21, HEAPU8[(wasm2asm_i32$0 + 1 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 2 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2asm_i32$0 + 3 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2asm_i32$0 + 4 | 0) >> 0] | 0 | 0) << 24); + print($$22 | 0); + $$23 = i; + $$24 = (wasm2asm_i32$0 = $$23, HEAPU8[(wasm2asm_i32$0 + 2 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 3 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2asm_i32$0 + 4 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2asm_i32$0 + 5 | 0) >> 0] | 0 | 0) << 24); + print($$24 | 0); + $$25 = i; + $$26 = (wasm2asm_i32$0 = $$25, HEAPU8[(wasm2asm_i32$0 + 25 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2asm_i32$0 + 26 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2asm_i32$0 + 27 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2asm_i32$0 + 28 | 0) >> 0] | 0 | 0) << 24); + print($$26 | 0); } function $$1(i) { i = i | 0; - HEAPU32[(i + 4294967295 | 0) >> 2] | 0; + var $$1 = 0, $$2 = 0; + $$1 = i; + $$2 = HEAPU32[($$1 + 4294967295 | 0) >> 2] | 0; } function __wasm_ctz_i32(x) { x = x | 0; - var $$1 = 0; - if ((x | 0) == (0 | 0)) $$1 = 32; else $$1 = 31 - Math_clz32(x ^ (x - 1 | 0) | 0) | 0; - return $$1 | 0; + var $$1 = 0, $$2 = 0, $$3 = 0, $$4 = 0, $$5 = 0, $$6 = 0, $$7 = 0, $$8 = 0, $$9 = 0, $$10 = 0; + $$1 = x; + $$2 = ($$1 | 0) == (0 | 0); + if ($$2) $$9 = 32; else { + $$3 = x; + $$4 = x; + $$5 = $$4 - 1 | 0; + $$6 = $$3 ^ $$5 | 0; + $$7 = Math_clz32($$6); + $$8 = 31 - $$7 | 0; + $$9 = $$8; + } + $$10 = $$9; + return $$10 | 0; } function __wasm_popcnt_i32(x) { x = x | 0; - var count = 0, $$2 = 0, $$3 = 0; + var count = 0, $$2 = 0, $$3 = 0, $$4 = 0, $$5 = 0, $$6 = 0, $$7 = 0, $$8 = 0, $$9 = 0, $$10 = 0, $$11 = 0, $$12 = 0, $$13 = 0, $$14 = 0, $$15 = 0; count = 0; b : { l : do { $$2 = count; - if ((x | 0) == (0 | 0)) break b; - x = x & (x - 1 | 0) | 0; - count = count + 1 | 0; + $$3 = x; + $$4 = ($$3 | 0) == (0 | 0); + $$5 = $$2; + if ($$4) break b; + $$6 = $$5; + $$7 = x; + $$8 = x; + $$9 = $$8 - 1 | 0; + $$10 = $$7 & $$9 | 0; + x = $$10; + $$11 = count; + $$12 = $$11 + 1 | 0; + count = $$12; continue l; break l; } while (1); }; - $$3 = $$2; - return $$3 | 0; + $$13 = $$5; + $$14 = $$13; + $$15 = $$14; + return $$15 | 0; } function __wasm_rotl_i32(x, k) { x = x | 0; k = k | 0; - return ((4294967295 >>> (k & 31 | 0) | 0) & x | 0) << (k & 31 | 0) | 0 | (((4294967295 << (32 - (k & 31 | 0) | 0) | 0) & x | 0) >>> (32 - (k & 31 | 0) | 0) | 0) | 0 | 0; + var $$2 = 0, $$3 = 0, $$4 = 0, $$5 = 0, $$6 = 0, $$7 = 0, $$8 = 0, $$9 = 0, $$10 = 0, $$11 = 0, $$12 = 0, $$13 = 0, $$14 = 0, $$15 = 0, $$16 = 0, $$17 = 0, $$18 = 0, $$19 = 0, $$20 = 0; + $$2 = k; + $$3 = $$2 & 31 | 0; + $$4 = 4294967295 >>> $$3 | 0; + $$5 = x; + $$6 = $$4 & $$5 | 0; + $$7 = k; + $$8 = $$7 & 31 | 0; + $$9 = $$6 << $$8 | 0; + $$10 = k; + $$11 = $$10 & 31 | 0; + $$12 = 32 - $$11 | 0; + $$13 = 4294967295 << $$12 | 0; + $$14 = x; + $$15 = $$13 & $$14 | 0; + $$16 = k; + $$17 = $$16 & 31 | 0; + $$18 = 32 - $$17 | 0; + $$19 = $$15 >>> $$18 | 0; + $$20 = $$9 | $$19 | 0; + return $$20 | 0; } function __wasm_rotr_i32(x, k) { x = x | 0; k = k | 0; - return ((4294967295 << (k & 31 | 0) | 0) & x | 0) >>> (k & 31 | 0) | 0 | (((4294967295 >>> (32 - (k & 31 | 0) | 0) | 0) & x | 0) << (32 - (k & 31 | 0) | 0) | 0) | 0 | 0; + var $$2 = 0, $$3 = 0, $$4 = 0, $$5 = 0, $$6 = 0, $$7 = 0, $$8 = 0, $$9 = 0, $$10 = 0, $$11 = 0, $$12 = 0, $$13 = 0, $$14 = 0, $$15 = 0, $$16 = 0, $$17 = 0, $$18 = 0, $$19 = 0, $$20 = 0; + $$2 = k; + $$3 = $$2 & 31 | 0; + $$4 = 4294967295 << $$3 | 0; + $$5 = x; + $$6 = $$4 & $$5 | 0; + $$7 = k; + $$8 = $$7 & 31 | 0; + $$9 = $$6 >>> $$8 | 0; + $$10 = k; + $$11 = $$10 & 31 | 0; + $$12 = 32 - $$11 | 0; + $$13 = 4294967295 >>> $$12 | 0; + $$14 = x; + $$15 = $$13 & $$14 | 0; + $$16 = k; + $$17 = $$16 & 31 | 0; + $$18 = 32 - $$17 | 0; + $$19 = $$15 << $$18 | 0; + $$20 = $$9 | $$19 | 0; + return $$20 | 0; } return { |