summaryrefslogtreecommitdiff
path: root/test/wasm2asm.traps.js
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-05-19 16:14:00 -0500
committerAlon Zakai <alonzakai@gmail.com>2018-05-19 14:14:00 -0700
commitd0ce93f8d7a08017618839498a9b920bbb132267 (patch)
tree752e836fcd09e37c6e7963622ac5d35aa2021d18 /test/wasm2asm.traps.js
parentcb64ec3879db3422ac4afd3119938f8dfe7b7b05 (diff)
downloadbinaryen-d0ce93f8d7a08017618839498a9b920bbb132267.tar.gz
binaryen-d0ce93f8d7a08017618839498a9b920bbb132267.tar.bz2
binaryen-d0ce93f8d7a08017618839498a9b920bbb132267.zip
wasm2asm: Finish f32/f64 operations (#1554)
Diffstat (limited to 'test/wasm2asm.traps.js')
-rw-r--r--test/wasm2asm.traps.js44
1 files changed, 4 insertions, 40 deletions
diff --git a/test/wasm2asm.traps.js b/test/wasm2asm.traps.js
index cc16410f1..3c393454e 100644
--- a/test/wasm2asm.traps.js
+++ b/test/wasm2asm.traps.js
@@ -34,42 +34,6 @@ function asmFunc(global, env, buffer) {
return (x | 0) / (y | 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;
- }
-
function __wasm_fetch_high_bits() {
return i64toi32_i32$HIGH_BITS | 0;
}
@@ -116,11 +80,11 @@ var asmModule = asmFunc({
var i = new Int32Array(2);
var f = new Float64Array(i.buffer);
f[0] = a;
- var ai1 = f[0];
- var ai2 = f[1];
+ var ai1 = i[0];
+ var ai2 = i[1];
f[0] = b;
- var bi1 = f[0];
- var bi2 = f[1];
+ var bi1 = i[0];
+ var bi2 = i[1];
return (isNaN(a) && isNaN(b)) || (ai1 == bi1 && ai2 == bi2);
}