diff options
Diffstat (limited to 'test/wasm2js/float-ops.2asm.js')
-rw-r--r-- | test/wasm2js/float-ops.2asm.js | 264 |
1 files changed, 108 insertions, 156 deletions
diff --git a/test/wasm2js/float-ops.2asm.js b/test/wasm2js/float-ops.2asm.js index 93d79f7e5..0c34582b5 100644 --- a/test/wasm2js/float-ops.2asm.js +++ b/test/wasm2js/float-ops.2asm.js @@ -245,244 +245,196 @@ function asmFunc(global, env, buffer) { return ~~$0 >>> 0 | 0; } - function $43($0, $0$hi) { + function $43($0, $1_1) { $0 = $0 | 0; - $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0; - i64toi32_i32$0 = $0$hi; - return Math_fround(Math_fround(+($0 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 | 0))); + $1_1 = $1_1 | 0; + return Math_fround(Math_fround(+($0 >>> 0) + 4294967296.0 * +($1_1 | 0))); } - function $44($0, $0$hi) { + function $44($0, $1_1) { $0 = $0 | 0; - $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0; - i64toi32_i32$0 = $0$hi; - return +(+($0 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 | 0)); + $1_1 = $1_1 | 0; + return +(+($0 >>> 0) + 4294967296.0 * +($1_1 | 0)); } - function $45($0, $0$hi) { + function $45($0, $1_1) { $0 = $0 | 0; - $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0; - i64toi32_i32$0 = $0$hi; - return Math_fround(Math_fround(+($0 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0))); + $1_1 = $1_1 | 0; + return Math_fround(Math_fround(+($0 >>> 0) + 4294967296.0 * +($1_1 >>> 0))); } - function $46($0, $0$hi) { + function $46($0, $1_1) { $0 = $0 | 0; - $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0; - i64toi32_i32$0 = $0$hi; - return +(+($0 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0)); + $1_1 = $1_1 | 0; + return +(+($0 >>> 0) + 4294967296.0 * +($1_1 >>> 0)); } function $47($0) { $0 = Math_fround($0); - var i64toi32_i32$0 = Math_fround(0), $3_1 = 0, $4_1 = 0, i64toi32_i32$1 = 0; - i64toi32_i32$0 = $0; - if (Math_fround(Math_abs(i64toi32_i32$0)) >= Math_fround(1.0)) { - { - if (i64toi32_i32$0 > Math_fround(0.0)) { - $3_1 = ~~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 { - $3_1 = ~~Math_fround(Math_ceil(Math_fround(Math_fround(i64toi32_i32$0 - Math_fround(~~i64toi32_i32$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0 - } - $4_1 = $3_1; + var $1_1 = 0; + if (Math_fround(Math_abs($0)) >= Math_fround(1.0)) { + if ($0 > Math_fround(0.0)) { + $1_1 = ~~Math_fround(Math_min(Math_fround(Math_floor(Math_fround($0 / Math_fround(4294967296.0)))), Math_fround(Math_fround(4294967296.0) - Math_fround(1.0)))) >>> 0 + } else { + $1_1 = ~~Math_fround(Math_ceil(Math_fround(Math_fround($0 - Math_fround(~~$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0 } } else { - $4_1 = 0 + $1_1 = 0 } - i64toi32_i32$1 = $4_1; - return (~~i64toi32_i32$0 >>> 0 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (0 | 0) | 0 | 0; + return (~~$0 >>> 0 | 0) == (0 | 0) & ($1_1 | 0) == (0 | 0) | 0 | 0; } function $48($0) { $0 = +$0; - var i64toi32_i32$0 = 0.0, $3_1 = 0, $4_1 = 0, i64toi32_i32$1 = 0; - i64toi32_i32$0 = $0; - if (Math_abs(i64toi32_i32$0) >= 1.0) { - { - if (i64toi32_i32$0 > 0.0) { - $3_1 = ~~Math_min(Math_floor(i64toi32_i32$0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0 - } else { - $3_1 = ~~Math_ceil((i64toi32_i32$0 - +(~~i64toi32_i32$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0 - } - $4_1 = $3_1; + var $1_1 = 0; + if (Math_abs($0) >= 1.0) { + if ($0 > 0.0) { + $1_1 = ~~Math_min(Math_floor($0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0 + } else { + $1_1 = ~~Math_ceil(($0 - +(~~$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0 } } else { - $4_1 = 0 + $1_1 = 0 } - i64toi32_i32$1 = $4_1; - return (~~i64toi32_i32$0 >>> 0 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (0 | 0) | 0 | 0; + return (~~$0 >>> 0 | 0) == (0 | 0) & ($1_1 | 0) == (0 | 0) | 0 | 0; } function $49($0) { $0 = Math_fround($0); - var i64toi32_i32$0 = Math_fround(0), $3_1 = 0, $4_1 = 0, i64toi32_i32$1 = 0; - i64toi32_i32$0 = $0; - if (Math_fround(Math_abs(i64toi32_i32$0)) >= Math_fround(1.0)) { - { - if (i64toi32_i32$0 > Math_fround(0.0)) { - $3_1 = ~~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 { - $3_1 = ~~Math_fround(Math_ceil(Math_fround(Math_fround(i64toi32_i32$0 - Math_fround(~~i64toi32_i32$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0 - } - $4_1 = $3_1; + var $1_1 = 0; + if (Math_fround(Math_abs($0)) >= Math_fround(1.0)) { + if ($0 > Math_fround(0.0)) { + $1_1 = ~~Math_fround(Math_min(Math_fround(Math_floor(Math_fround($0 / Math_fround(4294967296.0)))), Math_fround(Math_fround(4294967296.0) - Math_fround(1.0)))) >>> 0 + } else { + $1_1 = ~~Math_fround(Math_ceil(Math_fround(Math_fround($0 - Math_fround(~~$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0 } } else { - $4_1 = 0 + $1_1 = 0 } - i64toi32_i32$1 = $4_1; - return (~~i64toi32_i32$0 >>> 0 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (0 | 0) | 0 | 0; + return (~~$0 >>> 0 | 0) == (0 | 0) & ($1_1 | 0) == (0 | 0) | 0 | 0; } function $50($0) { $0 = +$0; - var i64toi32_i32$0 = 0.0, $3_1 = 0, $4_1 = 0, i64toi32_i32$1 = 0; - i64toi32_i32$0 = $0; - if (Math_abs(i64toi32_i32$0) >= 1.0) { - { - if (i64toi32_i32$0 > 0.0) { - $3_1 = ~~Math_min(Math_floor(i64toi32_i32$0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0 - } else { - $3_1 = ~~Math_ceil((i64toi32_i32$0 - +(~~i64toi32_i32$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0 - } - $4_1 = $3_1; + var $1_1 = 0; + if (Math_abs($0) >= 1.0) { + if ($0 > 0.0) { + $1_1 = ~~Math_min(Math_floor($0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0 + } else { + $1_1 = ~~Math_ceil(($0 - +(~~$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0 } } else { - $4_1 = 0 + $1_1 = 0 } - i64toi32_i32$1 = $4_1; - return (~~i64toi32_i32$0 >>> 0 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (0 | 0) | 0 | 0; + return (~~$0 >>> 0 | 0) == (0 | 0) & ($1_1 | 0) == (0 | 0) | 0 | 0; } function legalstub$43($0, $1_1) { $0 = $0 | 0; $1_1 = $1_1 | 0; - var i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, $10_1 = 0, $3_1 = 0, $3$hi = 0, $6$hi = 0; - i64toi32_i32$0 = 0; - $3_1 = $0; - $3$hi = i64toi32_i32$0; - i64toi32_i32$0 = 0; - i64toi32_i32$2 = $1_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) { + var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5_1 = 0, $6_1 = 0; + $2_1 = 0; + $6_1 = $2_1; + $2_1 = 0; + $3_1 = 32; + $4_1 = $3_1 & 31 | 0; + if (32 >>> 0 <= ($3_1 & 63 | 0) >>> 0) { { - i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; - $10_1 = 0; + $5_1 = $1_1 << $4_1 | 0; + $3_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; - $10_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; + $5_1 = ((1 << $4_1 | 0) - 1 | 0) & ($1_1 >>> (32 - $4_1 | 0) | 0) | 0 | ($2_1 << $4_1 | 0) | 0; + $3_1 = $1_1 << $4_1 | 0; } } - $6$hi = i64toi32_i32$1; - i64toi32_i32$1 = $3$hi; - i64toi32_i32$0 = $3_1; - i64toi32_i32$2 = $6$hi; - i64toi32_i32$3 = $10_1; - i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - return Math_fround(Math_fround($43(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0))); + $1_1 = $5_1; + $5_1 = $6_1; + $2_1 = $0; + $1_1 = $5_1 | $1_1 | 0; + return Math_fround(Math_fround($43($2_1 | $3_1 | 0 | 0, $1_1 | 0))); } function legalstub$44($0, $1_1) { $0 = $0 | 0; $1_1 = $1_1 | 0; - var i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, $10_1 = 0, $3_1 = 0, $3$hi = 0, $6$hi = 0; - i64toi32_i32$0 = 0; - $3_1 = $0; - $3$hi = i64toi32_i32$0; - i64toi32_i32$0 = 0; - i64toi32_i32$2 = $1_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) { + var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5_1 = 0, $6_1 = 0; + $2_1 = 0; + $6_1 = $2_1; + $2_1 = 0; + $3_1 = 32; + $4_1 = $3_1 & 31 | 0; + if (32 >>> 0 <= ($3_1 & 63 | 0) >>> 0) { { - i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; - $10_1 = 0; + $5_1 = $1_1 << $4_1 | 0; + $3_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; - $10_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; + $5_1 = ((1 << $4_1 | 0) - 1 | 0) & ($1_1 >>> (32 - $4_1 | 0) | 0) | 0 | ($2_1 << $4_1 | 0) | 0; + $3_1 = $1_1 << $4_1 | 0; } } - $6$hi = i64toi32_i32$1; - i64toi32_i32$1 = $3$hi; - i64toi32_i32$0 = $3_1; - i64toi32_i32$2 = $6$hi; - i64toi32_i32$3 = $10_1; - i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - return +(+$44(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0)); + $1_1 = $5_1; + $5_1 = $6_1; + $2_1 = $0; + $1_1 = $5_1 | $1_1 | 0; + return +(+$44($2_1 | $3_1 | 0 | 0, $1_1 | 0)); } function legalstub$45($0, $1_1) { $0 = $0 | 0; $1_1 = $1_1 | 0; - var i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, $10_1 = 0, $3_1 = 0, $3$hi = 0, $6$hi = 0; - i64toi32_i32$0 = 0; - $3_1 = $0; - $3$hi = i64toi32_i32$0; - i64toi32_i32$0 = 0; - i64toi32_i32$2 = $1_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) { + var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5_1 = 0, $6_1 = 0; + $2_1 = 0; + $6_1 = $2_1; + $2_1 = 0; + $3_1 = 32; + $4_1 = $3_1 & 31 | 0; + if (32 >>> 0 <= ($3_1 & 63 | 0) >>> 0) { { - i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; - $10_1 = 0; + $5_1 = $1_1 << $4_1 | 0; + $3_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; - $10_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; + $5_1 = ((1 << $4_1 | 0) - 1 | 0) & ($1_1 >>> (32 - $4_1 | 0) | 0) | 0 | ($2_1 << $4_1 | 0) | 0; + $3_1 = $1_1 << $4_1 | 0; } } - $6$hi = i64toi32_i32$1; - i64toi32_i32$1 = $3$hi; - i64toi32_i32$0 = $3_1; - i64toi32_i32$2 = $6$hi; - i64toi32_i32$3 = $10_1; - i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - return Math_fround(Math_fround($45(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0))); + $1_1 = $5_1; + $5_1 = $6_1; + $2_1 = $0; + $1_1 = $5_1 | $1_1 | 0; + return Math_fround(Math_fround($45($2_1 | $3_1 | 0 | 0, $1_1 | 0))); } function legalstub$46($0, $1_1) { $0 = $0 | 0; $1_1 = $1_1 | 0; - var i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, $10_1 = 0, $3_1 = 0, $3$hi = 0, $6$hi = 0; - i64toi32_i32$0 = 0; - $3_1 = $0; - $3$hi = i64toi32_i32$0; - i64toi32_i32$0 = 0; - i64toi32_i32$2 = $1_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) { + var $2_1 = 0, $3_1 = 0, $4_1 = 0, $5_1 = 0, $6_1 = 0; + $2_1 = 0; + $6_1 = $2_1; + $2_1 = 0; + $3_1 = 32; + $4_1 = $3_1 & 31 | 0; + if (32 >>> 0 <= ($3_1 & 63 | 0) >>> 0) { { - i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; - $10_1 = 0; + $5_1 = $1_1 << $4_1 | 0; + $3_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; - $10_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; + $5_1 = ((1 << $4_1 | 0) - 1 | 0) & ($1_1 >>> (32 - $4_1 | 0) | 0) | 0 | ($2_1 << $4_1 | 0) | 0; + $3_1 = $1_1 << $4_1 | 0; } } - $6$hi = i64toi32_i32$1; - i64toi32_i32$1 = $3$hi; - i64toi32_i32$0 = $3_1; - i64toi32_i32$2 = $6$hi; - i64toi32_i32$3 = $10_1; - i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - return +(+$46(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0)); + $1_1 = $5_1; + $5_1 = $6_1; + $2_1 = $0; + $1_1 = $5_1 | $1_1 | 0; + return +(+$46($2_1 | $3_1 | 0 | 0, $1_1 | 0)); } var FUNCTION_TABLE = []; |