diff options
author | Alex Crichton <alex@alexcrichton.com> | 2018-05-19 16:14:00 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2018-05-19 14:14:00 -0700 |
commit | d0ce93f8d7a08017618839498a9b920bbb132267 (patch) | |
tree | 752e836fcd09e37c6e7963622ac5d35aa2021d18 /test/wasm2asm/conversions-modified.2asm.js | |
parent | cb64ec3879db3422ac4afd3119938f8dfe7b7b05 (diff) | |
download | binaryen-d0ce93f8d7a08017618839498a9b920bbb132267.tar.gz binaryen-d0ce93f8d7a08017618839498a9b920bbb132267.tar.bz2 binaryen-d0ce93f8d7a08017618839498a9b920bbb132267.zip |
wasm2asm: Finish f32/f64 operations (#1554)
Diffstat (limited to 'test/wasm2asm/conversions-modified.2asm.js')
-rw-r--r-- | test/wasm2asm/conversions-modified.2asm.js | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/test/wasm2asm/conversions-modified.2asm.js b/test/wasm2asm/conversions-modified.2asm.js index 89c52e3a5..b4613c407 100644 --- a/test/wasm2asm/conversions-modified.2asm.js +++ b/test/wasm2asm/conversions-modified.2asm.js @@ -20,18 +20,24 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$HIGH_BITS = 0; function $0(x) { x = x | 0; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0; + var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, wasm2asm_i32$0 = 0; i64toi32_i32$1 = x; i64toi32_i32$0 = i64toi32_i32$1 >> 31 | 0; + i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; + return wasm2asm_i32$0 | 0; } function $1(x) { x = x | 0; - i64toi32_i32$HIGH_BITS = 0; + var i64toi32_i32$0 = 0, wasm2asm_i32$0 = 0; + i64toi32_i32$0 = 0; + i64toi32_i32$0 = i64toi32_i32$0; + i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return x | 0; + return wasm2asm_i32$0 | 0; } function $2(x, x$hi) { @@ -62,54 +68,66 @@ function asmFunc(global, env, buffer) { function $7(x) { x = Math_fround(x); - var i64toi32_i32$0 = Math_fround(0), $2 = 0, $3 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = Math_fround(0), i64toi32_i32$1 = 0, $4 = 0, $5 = 0, i64toi32_i32$2 = 0, wasm2asm_i32$0 = 0; i64toi32_i32$0 = x; if (Math_fround(Math_abs(i64toi32_i32$0)) >= Math_fround(1.0)) { - if (i64toi32_i32$0 > Math_fround(0.0)) $2 = ~~Math_fround(Math_min(Math_fround(Math_floor(Math_fround(i64toi32_i32$0 / Math_fround(4294967296.0)))), Math_fround(Math_fround(4294967296.0) - Math_fround(1.0)))) >>> 0; else $2 = ~~Math_fround(Math_ceil(Math_fround(Math_fround(i64toi32_i32$0 - Math_fround(~~i64toi32_i32$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0; - $3 = $2; - } else $3 = 0; + if (i64toi32_i32$0 > Math_fround(0.0)) $4 = ~~Math_fround(Math_min(Math_fround(Math_floor(Math_fround(i64toi32_i32$0 / Math_fround(4294967296.0)))), Math_fround(Math_fround(4294967296.0) - Math_fround(1.0)))) >>> 0; else $4 = ~~Math_fround(Math_ceil(Math_fround(Math_fround(i64toi32_i32$0 - Math_fround(~~i64toi32_i32$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0; + $5 = $4; + } else $5 = 0; + i64toi32_i32$1 = $5; + i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = ~~i64toi32_i32$0 >>> 0; - i64toi32_i32$HIGH_BITS = $3; + i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; + return wasm2asm_i32$0 | 0; } function $8(x) { x = Math_fround(x); - var i64toi32_i32$0 = Math_fround(0), $2 = 0, $3 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = Math_fround(0), i64toi32_i32$1 = 0, $4 = 0, $5 = 0, i64toi32_i32$2 = 0, wasm2asm_i32$0 = 0; i64toi32_i32$0 = x; if (Math_fround(Math_abs(i64toi32_i32$0)) >= Math_fround(1.0)) { - if (i64toi32_i32$0 > Math_fround(0.0)) $2 = ~~Math_fround(Math_min(Math_fround(Math_floor(Math_fround(i64toi32_i32$0 / Math_fround(4294967296.0)))), Math_fround(Math_fround(4294967296.0) - Math_fround(1.0)))) >>> 0; else $2 = ~~Math_fround(Math_ceil(Math_fround(Math_fround(i64toi32_i32$0 - Math_fround(~~i64toi32_i32$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0; - $3 = $2; - } else $3 = 0; + if (i64toi32_i32$0 > Math_fround(0.0)) $4 = ~~Math_fround(Math_min(Math_fround(Math_floor(Math_fround(i64toi32_i32$0 / Math_fround(4294967296.0)))), Math_fround(Math_fround(4294967296.0) - Math_fround(1.0)))) >>> 0; else $4 = ~~Math_fround(Math_ceil(Math_fround(Math_fround(i64toi32_i32$0 - Math_fround(~~i64toi32_i32$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0; + $5 = $4; + } else $5 = 0; + i64toi32_i32$1 = $5; + i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = ~~i64toi32_i32$0 >>> 0; - i64toi32_i32$HIGH_BITS = $3; + i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; + return wasm2asm_i32$0 | 0; } function $9(x) { x = +x; - var i64toi32_i32$0 = 0.0, $2 = 0, $3 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = 0.0, i64toi32_i32$1 = 0, $4 = 0, $5 = 0, i64toi32_i32$2 = 0, wasm2asm_i32$0 = 0; i64toi32_i32$0 = x; if (Math_abs(i64toi32_i32$0) >= 1.0) { - if (i64toi32_i32$0 > 0.0) $2 = ~~Math_min(Math_floor(i64toi32_i32$0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0; else $2 = ~~Math_ceil((i64toi32_i32$0 - +(~~i64toi32_i32$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0; - $3 = $2; - } else $3 = 0; + if (i64toi32_i32$0 > 0.0) $4 = ~~Math_min(Math_floor(i64toi32_i32$0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0; else $4 = ~~Math_ceil((i64toi32_i32$0 - +(~~i64toi32_i32$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0; + $5 = $4; + } else $5 = 0; + i64toi32_i32$1 = $5; + i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = ~~i64toi32_i32$0 >>> 0; - i64toi32_i32$HIGH_BITS = $3; + i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; + return wasm2asm_i32$0 | 0; } function $10(x) { x = +x; - var i64toi32_i32$0 = 0.0, $2 = 0, $3 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = 0.0, i64toi32_i32$1 = 0, $4 = 0, $5 = 0, i64toi32_i32$2 = 0, wasm2asm_i32$0 = 0; i64toi32_i32$0 = x; if (Math_abs(i64toi32_i32$0) >= 1.0) { - if (i64toi32_i32$0 > 0.0) $2 = ~~Math_min(Math_floor(i64toi32_i32$0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0; else $2 = ~~Math_ceil((i64toi32_i32$0 - +(~~i64toi32_i32$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0; - $3 = $2; - } else $3 = 0; + if (i64toi32_i32$0 > 0.0) $4 = ~~Math_min(Math_floor(i64toi32_i32$0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0; else $4 = ~~Math_ceil((i64toi32_i32$0 - +(~~i64toi32_i32$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0; + $5 = $4; + } else $5 = 0; + i64toi32_i32$1 = $5; + i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = ~~i64toi32_i32$0 >>> 0; - i64toi32_i32$HIGH_BITS = $3; + i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; + return wasm2asm_i32$0 | 0; } function $11(x) { @@ -120,7 +138,10 @@ function asmFunc(global, env, buffer) { function $12(x, x$hi) { x = x | 0; x$hi = x$hi | 0; - return Math_fround(Math_fround(+(x >>> 0) + 4294967296.0 * +(x$hi | 0))); + var i64toi32_i32$0 = 0; + i64toi32_i32$0 = x$hi; + i64toi32_i32$0 = i64toi32_i32$0; + return Math_fround(Math_fround(+(x >>> 0) + 4294967296.0 * +(i64toi32_i32$0 | 0))); } function $13(x) { @@ -131,7 +152,10 @@ function asmFunc(global, env, buffer) { function $14(x, x$hi) { x = x | 0; x$hi = x$hi | 0; - return +(+(x >>> 0) + 4294967296.0 * +(x$hi | 0)); + var i64toi32_i32$0 = 0; + i64toi32_i32$0 = x$hi; + i64toi32_i32$0 = i64toi32_i32$0; + return +(+(x >>> 0) + 4294967296.0 * +(i64toi32_i32$0 | 0)); } function $15(x) { @@ -142,7 +166,10 @@ function asmFunc(global, env, buffer) { function $16(x, x$hi) { x = x | 0; x$hi = x$hi | 0; - return Math_fround(Math_fround(+(x >>> 0) + 4294967296.0 * +(x$hi >>> 0))); + var i64toi32_i32$0 = 0; + i64toi32_i32$0 = x$hi; + i64toi32_i32$0 = i64toi32_i32$0; + return Math_fround(Math_fround(+(x >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0))); } function $17(x) { @@ -153,7 +180,10 @@ function asmFunc(global, env, buffer) { function $18(x, x$hi) { x = x | 0; x$hi = x$hi | 0; - return +(+(x >>> 0) + 4294967296.0 * +(x$hi >>> 0)); + var i64toi32_i32$0 = 0; + i64toi32_i32$0 = x$hi; + i64toi32_i32$0 = i64toi32_i32$0; + return +(+(x >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0)); } function $19(x) { @@ -174,8 +204,11 @@ function asmFunc(global, env, buffer) { function $22(x, x$hi) { x = x | 0; x$hi = x$hi | 0; + var i64toi32_i32$0 = 0; + i64toi32_i32$0 = x$hi; + i64toi32_i32$0 = i64toi32_i32$0; HEAP32[0 >> 2] = x; - HEAP32[(0 + 4 | 0) >> 2] = x$hi; + HEAP32[(0 + 4 | 0) >> 2] = i64toi32_i32$0; return +(+HEAPF64[0 >> 3]); } @@ -186,47 +219,14 @@ function asmFunc(global, env, buffer) { function $24(x) { x = +x; - var i64toi32_i32$1 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, wasm2asm_i32$0 = 0; HEAPF64[0 >> 3] = x; + i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; + i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; - i64toi32_i32$HIGH_BITS = HEAP32[(0 + 4 | 0) >> 2] | 0; + i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 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; - } - - function __wasm_popcnt_i32(x) { - x = x | 0; - var count = 0, $2 = 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; - continue l; - break l; - } while (1); - }; - return $2 | 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; - } - - 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; + return wasm2asm_i32$0 | 0; } return { |