summaryrefslogtreecommitdiff
path: root/test/wasm2asm/reinterpret.2asm.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/wasm2asm/reinterpret.2asm.js')
-rw-r--r--test/wasm2asm/reinterpret.2asm.js47
1 files changed, 9 insertions, 38 deletions
diff --git a/test/wasm2asm/reinterpret.2asm.js b/test/wasm2asm/reinterpret.2asm.js
index 2cbd597f6..6adf2b95d 100644
--- a/test/wasm2asm/reinterpret.2asm.js
+++ b/test/wasm2asm/reinterpret.2asm.js
@@ -30,46 +30,17 @@ function asmFunc(global, env, buffer) {
function $2($0, $0$hi) {
$0 = $0 | 0;
$0$hi = $0$hi | 0;
+ var i64toi32_i32$0 = 0, $3$hi = 0;
+ i64toi32_i32$0 = $0$hi;
+ i64toi32_i32$0 = i64toi32_i32$0;
HEAP32[0 >> 2] = $0;
- HEAP32[(0 + 4 | 0) >> 2] = $0$hi;
+ HEAP32[(0 + 4 | 0) >> 2] = i64toi32_i32$0;
HEAPF64[0 >> 3] = +HEAPF64[0 >> 3];
- return (HEAP32[0 >> 2] | 0 | 0) == ($0 | 0) & (HEAP32[(0 + 4 | 0) >> 2] | 0 | 0) == ($0$hi | 0) | 0 | 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;
+ i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0;
+ $3$hi = i64toi32_i32$0;
+ i64toi32_i32$0 = $0$hi;
+ i64toi32_i32$0 = $3$hi;
+ return (HEAP32[0 >> 2] | 0 | 0) == ($0 | 0) & (i64toi32_i32$0 | 0) == ($0$hi | 0) | 0 | 0;
}
return {