diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit.asm.js | 2 | ||||
-rw-r--r-- | test/unit.fromasm | 6 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index df731148a..da4269873 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -207,9 +207,11 @@ function asm(global, env, buffer) { function bitcasts(i, f) { i = i | 0; f = Math_fround(f); + var d = 0.0; (HEAP32[tempDoublePtr >> 2] = i, Math_fround(HEAPF32[tempDoublePtr >> 2])); // i32->f32 (HEAP32[tempDoublePtr >> 2] = i, +HEAPF32[tempDoublePtr >> 2]); // i32->f32, no fround (HEAPF32[tempDoublePtr >> 2] = f, HEAP32[tempDoublePtr >> 2] | 0); // f32->i32 + (HEAPF32[tempDoublePtr >> 2] = d, HEAP32[tempDoublePtr >> 2] | 0); // f64 with implict f32 conversion, ->i32 } function z() { diff --git a/test/unit.fromasm b/test/unit.fromasm index eda3ea485..41e1154b5 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -460,6 +460,7 @@ ) ) (func $bitcasts (param $i i32) (param $f f32) + (local $d f64) (f32.reinterpret/i32 (get_local $i) ) @@ -471,6 +472,11 @@ (i32.reinterpret/f32 (get_local $f) ) + (i32.reinterpret/f32 + (f32.demote/f64 + (get_local $d) + ) + ) ) (func $z (nop) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 2d7147edb..3c8a7d917 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -454,6 +454,7 @@ ) ) (func $bitcasts (param $i i32) (param $f f32) + (local $d f64) (f32.reinterpret/i32 (get_local $i) ) @@ -465,6 +466,11 @@ (i32.reinterpret/f32 (get_local $f) ) + (i32.reinterpret/f32 + (f32.demote/f64 + (get_local $d) + ) + ) ) (func $z (nop) |