summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit.asm.js8
-rw-r--r--test/unit.fromasm20
2 files changed, 28 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js
index e539c6139..491f90835 100644
--- a/test/unit.asm.js
+++ b/test/unit.asm.js
@@ -6,6 +6,7 @@ function asm() {
var Double = 0.0;
var Math_fround = global.Math.fround;
var Math_abs = global.Math.abs;
+ var Math_ceil = global.Math.ceil;
function big_negative() {
var temp = 0.0;
@@ -135,6 +136,13 @@ function asm() {
h(i | 0);
}
}
+ function ceiling_32_64(u, B) {
+ u = Math_fround(u);
+ B = +B;
+ var temp = Math_fround(0);
+ temp = Math_fround(Math_ceil(B));
+ temp = Math_fround(u * Math_fround(Math_ceil(Math_fround(B))));
+ }
function z() {
}
diff --git a/test/unit.fromasm b/test/unit.fromasm
index c9fe453ef..4d2b54a96 100644
--- a/test/unit.fromasm
+++ b/test/unit.fromasm
@@ -426,6 +426,26 @@
(br $for-in$1)
)
)
+ (func $ceiling_32_64 (param $u f32) (param $B f64)
+ (local $temp f32)
+ (set_local $temp
+ (f32.demote/f64
+ (f64.ceil
+ (get_local $B)
+ )
+ )
+ )
+ (set_local $temp
+ (f32.mul
+ (get_local $u)
+ (f32.ceil
+ (f32.demote/f64
+ (get_local $B)
+ )
+ )
+ )
+ )
+ )
(func $z
(nop)
)