diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit.asm.js | 2 | ||||
-rw-r--r-- | test/unit.fromasm | 19 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise | 19 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise.no-opts | 19 | ||||
-rw-r--r-- | test/unit.fromasm.no-opts | 19 |
5 files changed, 62 insertions, 16 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index b0e4e7594..380c97b41 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -194,6 +194,8 @@ function asm(global, env, buffer) { abort(); abort(55); abort(); + abort(12.34); + abort(Math_fround(56.78)); } function continues() { while (1) { diff --git a/test/unit.fromasm b/test/unit.fromasm index 6939b9138..e5b08cdf5 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -5,7 +5,8 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) - (import $abort "env" "abort" (param i32)) + (type $FUNCSIG$vd (func (param f64))) + (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) @@ -303,13 +304,23 @@ ) (func $aborts (call_import $abort - (i32.const 0) + (f64.const 0) ) (call_import $abort - (i32.const 55) + (f64.convert_s/i32 + (i32.const 55) + ) + ) + (call_import $abort + (f64.const 0) ) (call_import $abort - (i32.const 0) + (f64.const 12.34) + ) + (call_import $abort + (f64.promote/f32 + (f32.const 56.779998779296875) + ) ) ) (func $continues diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index ba8dae715..1ee3b88ea 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -4,7 +4,8 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) - (import $abort "env" "abort" (param i32)) + (type $FUNCSIG$vd (func (param f64))) + (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) @@ -295,13 +296,23 @@ ) (func $aborts (call_import $abort - (i32.const 0) + (f64.const 0) ) (call_import $abort - (i32.const 55) + (f64.convert_s/i32 + (i32.const 55) + ) + ) + (call_import $abort + (f64.const 0) ) (call_import $abort - (i32.const 0) + (f64.const 12.34) + ) + (call_import $abort + (f64.promote/f32 + (f32.const 56.779998779296875) + ) ) ) (func $continues diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 9f49824f3..4fa627938 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -4,7 +4,8 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) - (import $abort "env" "abort" (param i32)) + (type $FUNCSIG$vd (func (param f64))) + (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64)) @@ -515,13 +516,23 @@ ) (func $aborts (call_import $abort - (i32.const 0) + (f64.const 0) ) (call_import $abort - (i32.const 55) + (f64.convert_s/i32 + (i32.const 55) + ) ) (call_import $abort - (i32.const 0) + (f64.const 0) + ) + (call_import $abort + (f64.const 12.34) + ) + (call_import $abort + (f64.promote/f32 + (f32.const 56.779998779296875) + ) ) ) (func $continues diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index ccf89c5b6..e4338b657 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -5,7 +5,8 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) - (import $abort "env" "abort" (param i32)) + (type $FUNCSIG$vd (func (param f64))) + (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32)) @@ -519,13 +520,23 @@ ) (func $aborts (call_import $abort - (i32.const 0) + (f64.const 0) ) (call_import $abort - (i32.const 55) + (f64.convert_s/i32 + (i32.const 55) + ) ) (call_import $abort - (i32.const 0) + (f64.const 0) + ) + (call_import $abort + (f64.const 12.34) + ) + (call_import $abort + (f64.promote/f32 + (f32.const 56.779998779296875) + ) ) ) (func $continues |