diff options
Diffstat (limited to 'test/unit.fromasm.imprecise.no-opts')
-rw-r--r-- | test/unit.fromasm.imprecise.no-opts | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 824606764..46d746946 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -4,6 +4,10 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vd (func (param f64))) + (import $t global "global" "NaN" f64) + (import $u global "global" "Infinity" f64) + (import $tempDoublePtr global "env" "tempDoublePtr" i32) + (import $n global "env" "gb" i32) (import $abort "env" "abort" (param f64)) (import $print "env" "print" (param i32)) (import $h "env" "h" (param i32)) @@ -11,6 +15,8 @@ (export "big_negative" $big_negative) (export "pick" $exportMe) (export "memory" memory) + (global $Int i32 (i32.const 0)) + (global $Double f64 (f64.const 0)) (table 10 10 anyfunc) (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) (func $big_negative @@ -37,31 +43,21 @@ (f64.add (f64.add (f64.add - (f64.load - (i32.const 8) - ) - (f64.load - (i32.const 16) - ) + (get_global $t) + (get_global $u) ) (f64.neg - (f64.load - (i32.const 16) - ) + (get_global $u) ) ) (f64.neg - (f64.load - (i32.const 8) - ) + (get_global $t) ) ) ) (if (i32.gt_s - (i32.load - (i32.const 24) - ) + (get_global $Int) (i32.const 0) ) (return @@ -70,9 +66,7 @@ ) (if (f64.gt - (f64.load - (i32.const 32) - ) + (get_global $Double) (f64.const 0) ) (return @@ -781,9 +775,7 @@ (get_local $a) (i32.add (i32.add - (i32.load - (i32.const 48) - ) + (get_global $n) (i32.const 136) ) (i32.const 8) |