summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/wasm-only.asm.js7
-rw-r--r--test/wasm-only.fromasm9
-rw-r--r--test/wasm-only.fromasm.imprecise9
-rw-r--r--test/wasm-only.fromasm.imprecise.no-opts32
-rw-r--r--test/wasm-only.fromasm.no-opts32
5 files changed, 88 insertions, 1 deletions
diff --git a/test/wasm-only.asm.js b/test/wasm-only.asm.js
index 568687904..8dc208372 100644
--- a/test/wasm-only.asm.js
+++ b/test/wasm-only.asm.js
@@ -74,10 +74,15 @@ function asm(global, env, buffer) {
}
function test() {
- var i = 0, f = fround(0);
+ var i = 0, j = i64(), f = fround(0), f1 = fround(0), f2 = fround(0), d1 = +0, d2 = +0;
// bitcasts
i = i32_bc2i(f);
f = i32_bc2f(i);
+ i = i32_cttz(i);
+ i = i32_ctpop(i);
+ j = i64_ctpop(j);
+ f1 = f32_copysign(f1, f2);
+ d1 = f64_copysign(d1, d2);
}
function test64() {
diff --git a/test/wasm-only.fromasm b/test/wasm-only.fromasm
index 8f3b2fa5c..e8f8cfc79 100644
--- a/test/wasm-only.fromasm
+++ b/test/wasm-only.fromasm
@@ -111,6 +111,15 @@
(get_local $1)
)
)
+ (func $test
+ (local $0 f32)
+ (local $1 i32)
+ (set_local $1
+ (i32.reinterpret/f32
+ (get_local $0)
+ )
+ )
+ )
(func $i64u-div (param $0 i64) (param $1 i64) (result i64)
(select
(i64.const 0)
diff --git a/test/wasm-only.fromasm.imprecise b/test/wasm-only.fromasm.imprecise
index ac76c6c90..b27eb3f9b 100644
--- a/test/wasm-only.fromasm.imprecise
+++ b/test/wasm-only.fromasm.imprecise
@@ -110,6 +110,15 @@
(get_local $1)
)
)
+ (func $test
+ (local $0 f32)
+ (local $1 i32)
+ (set_local $1
+ (i32.reinterpret/f32
+ (get_local $0)
+ )
+ )
+ )
(func $test64
(local $0 i64)
(local $1 i32)
diff --git a/test/wasm-only.fromasm.imprecise.no-opts b/test/wasm-only.fromasm.imprecise.no-opts
index 78050d9cd..dfd7db50e 100644
--- a/test/wasm-only.fromasm.imprecise.no-opts
+++ b/test/wasm-only.fromasm.imprecise.no-opts
@@ -224,7 +224,12 @@
)
(func $test
(local $i i32)
+ (local $j i64)
(local $f f32)
+ (local $f1 f32)
+ (local $f2 f32)
+ (local $d1 f64)
+ (local $d2 f64)
(set_local $i
(i32.reinterpret/f32
(get_local $f)
@@ -235,6 +240,33 @@
(get_local $i)
)
)
+ (set_local $i
+ (i32.ctz
+ (get_local $i)
+ )
+ )
+ (set_local $i
+ (i32.popcnt
+ (get_local $i)
+ )
+ )
+ (set_local $j
+ (i64.popcnt
+ (get_local $j)
+ )
+ )
+ (set_local $f1
+ (f32.copysign
+ (get_local $f1)
+ (get_local $f2)
+ )
+ )
+ (set_local $d1
+ (f64.copysign
+ (get_local $d1)
+ (get_local $d2)
+ )
+ )
)
(func $test64
(local $x i64)
diff --git a/test/wasm-only.fromasm.no-opts b/test/wasm-only.fromasm.no-opts
index 31840158b..491abf98f 100644
--- a/test/wasm-only.fromasm.no-opts
+++ b/test/wasm-only.fromasm.no-opts
@@ -224,7 +224,12 @@
)
(func $test
(local $i i32)
+ (local $j i64)
(local $f f32)
+ (local $f1 f32)
+ (local $f2 f32)
+ (local $d1 f64)
+ (local $d2 f64)
(set_local $i
(i32.reinterpret/f32
(get_local $f)
@@ -235,6 +240,33 @@
(get_local $i)
)
)
+ (set_local $i
+ (i32.ctz
+ (get_local $i)
+ )
+ )
+ (set_local $i
+ (i32.popcnt
+ (get_local $i)
+ )
+ )
+ (set_local $j
+ (i64.popcnt
+ (get_local $j)
+ )
+ )
+ (set_local $f1
+ (f32.copysign
+ (get_local $f1)
+ (get_local $f2)
+ )
+ )
+ (set_local $d1
+ (f64.copysign
+ (get_local $d1)
+ (get_local $d2)
+ )
+ )
)
(func $i64u-div (param $0 i64) (param $1 i64) (result i64)
(if i64