diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-02-21 12:10:26 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-02-21 12:10:26 -0800 |
commit | ed567a4f49d3296dcf91bdb966c0deb077dacff7 (patch) | |
tree | 736f07fcd61a8c4623938220c6c3768c3d2b5807 /test | |
parent | 7bf31d447bca02947b56f05edf0a171c68c92c7a (diff) | |
parent | 1956794aa5200274d7b67329be55bf97af83f49e (diff) | |
download | binaryen-ed567a4f49d3296dcf91bdb966c0deb077dacff7.tar.gz binaryen-ed567a4f49d3296dcf91bdb966c0deb077dacff7.tar.bz2 binaryen-ed567a4f49d3296dcf91bdb966c0deb077dacff7.zip |
Merge pull request #209 from WebAssembly/asm-fixes
Asm fixes
Diffstat (limited to 'test')
-rw-r--r-- | test/unit.asm.js | 8 | ||||
-rw-r--r-- | test/unit.fromasm | 20 |
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) ) |