summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.imprecise
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit.fromasm.imprecise')
-rw-r--r--test/unit.fromasm.imprecise155
1 files changed, 73 insertions, 82 deletions
diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise
index fb55716e8..b40a5bd06 100644
--- a/test/unit.fromasm.imprecise
+++ b/test/unit.fromasm.imprecise
@@ -9,7 +9,7 @@
(type $FUNCSIG$i (func (result i32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 25 25 funcref))
- (elem (global.get $__table_base) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $z $cneg $z $z $z $z $z $z $vi $vi $vi $vi $vi $vi $vi $vi $ii)
+ (elem (global.get $__table_base) $big_negative $big_negative $big_negative $big_negative $w $w $importedDoubles $w $fr $cneg $fr $fr $fr $fr $fr $fr $vi $vi $vi $vi $vi $vi $vi $vi $ii)
(import "env" "__table_base" (global $__table_base i32))
(import "env" "gb" (global $n$asm2wasm$import i32))
(import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32)))
@@ -28,22 +28,22 @@
(export "pick" (func $big_negative))
(export "doubleCompares" (func $doubleCompares))
(export "intOps" (func $intOps))
- (export "conversions" (func $legalstub$conversions))
+ (export "conversions" (func $conversions))
(export "switcher" (func $switcher))
(export "frem" (func $frem))
- (export "frem_float" (func $legalstub$frem_float))
+ (export "frem_float" (func $frem_float))
(export "big_uint_div_u" (func $big_uint_div_u))
(export "trapping_sint_div_s" (func $trapping_sint_div_s))
- (export "fr" (func $legalstub$fr))
+ (export "fr" (func $fr))
(export "negZero" (func $negZero))
(export "neg" (func $neg))
(export "smallCompare" (func $smallCompare))
(export "cneg_nosemicolon" (func $cneg_nosemicolon))
(export "forLoop" (func $forLoop))
- (export "ceiling_32_64" (func $legalstub$ceiling_32_64))
+ (export "ceiling_32_64" (func $ceiling_32_64))
(export "aborts" (func $aborts))
(export "continues" (func $continues))
- (export "bitcasts" (func $legalstub$bitcasts))
+ (export "bitcasts" (func $bitcasts))
(export "recursiveBlockMerging" (func $recursiveBlockMerging))
(export "lb" (func $lb))
(export "zeroInit" (func $zeroInit))
@@ -72,7 +72,7 @@
(export "store_fround" (func $store_fround))
(export "exportedNumber" (global $exportedNumber))
(export "relocatableAndModules" (func $relocatableAndModules))
- (export "exported_f32_user" (func $legalstub$exported_f32_user))
+ (export "exported_f32_user" (func $exported_f32_user))
(export "keepAlive" (func $keepAlive))
(func $big_negative (; 7 ;) (; has Stack IR ;)
(nop)
@@ -142,7 +142,10 @@
(local.get $0)
)
)
- (func $switcher (; 11 ;) (; has Stack IR ;) (param $0 i32) (result i32)
+ (func $conversions (; 11 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f32)
+ (nop)
+ )
+ (func $switcher (; 12 ;) (; has Stack IR ;) (param $0 i32) (result i32)
(block $switch
(block $switch-case0
(block $switch-case
@@ -199,37 +202,48 @@
)
(i32.const 0)
)
- (func $frem (; 12 ;) (; has Stack IR ;) (result f64)
+ (func $frem (; 13 ;) (; has Stack IR ;) (result f64)
(call $f64-rem
(f64.const 5.5)
(f64.const 1.2)
)
)
- (func $big_uint_div_u (; 13 ;) (; has Stack IR ;) (result i32)
+ (func $frem_float (; 14 ;) (; has Stack IR ;) (result f32)
+ (f32.demote_f64
+ (call $f64-rem
+ (f64.const 5.5)
+ (f64.const 1.2000000476837158)
+ )
+ )
+ )
+ (func $big_uint_div_u (; 15 ;) (; has Stack IR ;) (result i32)
(i32.const 2147483647)
)
- (func $trapping_sint_div_s (; 14 ;) (; has Stack IR ;) (result i32)
+ (func $trapping_sint_div_s (; 16 ;) (; has Stack IR ;) (result i32)
(i32.div_s
(i32.const -2147483648)
(i32.const -1)
)
)
- (func $negZero (; 15 ;) (; has Stack IR ;) (result f64)
+ (func $fr (; 17 ;) (; has Stack IR ;) (param $0 f32)
+ (nop)
+ )
+ (func $negZero (; 18 ;) (; has Stack IR ;) (result f64)
(f64.const -0)
)
- (func $neg (; 16 ;) (; has Stack IR ;)
+ (func $neg (; 19 ;) (; has Stack IR ;)
(call_indirect (type $FUNCSIG$vf)
(f32.const -0)
(i32.const 9)
)
)
- (func $cneg (; 17 ;) (; has Stack IR ;) (param $0 f32)
+ (func $cneg (; 20 ;) (; has Stack IR ;) (param $0 f32)
(call_indirect (type $FUNCSIG$vf)
(local.get $0)
(i32.const 9)
)
)
- (func $smallCompare (; 18 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
+ (func $smallCompare (; 21 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
(if (result i32)
(i32.lt_u
(local.tee $0
@@ -254,13 +268,13 @@
(local.get $0)
)
)
- (func $cneg_nosemicolon (; 19 ;) (; has Stack IR ;)
+ (func $cneg_nosemicolon (; 22 ;) (; has Stack IR ;)
(call_indirect (type $FUNCSIG$vi)
(i32.const 1)
(i32.const 17)
)
)
- (func $forLoop (; 20 ;) (; has Stack IR ;)
+ (func $forLoop (; 23 ;) (; has Stack IR ;)
(local $0 i32)
(local.set $0
(i32.const 1)
@@ -286,7 +300,10 @@
)
)
)
- (func $aborts (; 21 ;) (; has Stack IR ;)
+ (func $ceiling_32_64 (; 24 ;) (; has Stack IR ;) (param $0 f32) (param $1 f64)
+ (nop)
+ )
+ (func $aborts (; 25 ;) (; has Stack IR ;)
(drop
(call $abort
(f64.const 0)
@@ -315,7 +332,7 @@
)
)
)
- (func $continues (; 22 ;) (; has Stack IR ;)
+ (func $continues (; 26 ;) (; has Stack IR ;)
(loop $while-in
(call $print
(i32.const 1)
@@ -334,7 +351,10 @@
(br $while-in)
)
)
- (func $recursiveBlockMerging (; 23 ;) (; has Stack IR ;) (param $0 i32) (result i32)
+ (func $bitcasts (; 27 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32)
+ (nop)
+ )
+ (func $recursiveBlockMerging (; 28 ;) (; has Stack IR ;) (param $0 i32) (result i32)
(drop
(call $lb
(i32.add
@@ -409,7 +429,7 @@
)
)
)
- (func $lb (; 24 ;) (; has Stack IR ;) (param $0 i32) (result i32)
+ (func $lb (; 29 ;) (; has Stack IR ;) (param $0 i32) (result i32)
(i32.store
(local.get $0)
(i32.add
@@ -419,7 +439,7 @@
)
(i32.const 0)
)
- (func $zeroInit (; 25 ;) (; has Stack IR ;) (param $0 i32)
+ (func $zeroInit (; 30 ;) (; has Stack IR ;) (param $0 i32)
(local $1 i32)
(if
(i32.eq
@@ -445,7 +465,7 @@
)
)
)
- (func $phi (; 26 ;) (; has Stack IR ;) (result i32)
+ (func $phi (; 31 ;) (; has Stack IR ;) (result i32)
(block $do-once (result i32)
(drop
(br_if $do-once
@@ -458,7 +478,7 @@
(i32.const 1)
)
)
- (func $smallIf (; 27 ;) (; has Stack IR ;)
+ (func $smallIf (; 32 ;) (; has Stack IR ;)
(if
(call $return_int)
(drop
@@ -468,7 +488,7 @@
)
)
)
- (func $dropCall (; 28 ;) (; has Stack IR ;) (result i32)
+ (func $dropCall (; 33 ;) (; has Stack IR ;) (result i32)
(if
(call $return_int)
(block
@@ -489,7 +509,7 @@
)
(call $phi)
)
- (func $useSetGlobal (; 29 ;) (; has Stack IR ;) (result i32)
+ (func $useSetGlobal (; 34 ;) (; has Stack IR ;) (result i32)
(global.set $Int
(i32.const 10)
)
@@ -501,13 +521,13 @@
)
(global.get $Int)
)
- (func $usesSetGlobal2 (; 30 ;) (; has Stack IR ;) (result i32)
+ (func $usesSetGlobal2 (; 35 ;) (; has Stack IR ;) (result i32)
(global.set $Int
(i32.const 40)
)
(i32.const 50)
)
- (func $breakThroughMany (; 31 ;) (; has Stack IR ;) (param $0 i32)
+ (func $breakThroughMany (; 36 ;) (; has Stack IR ;) (param $0 i32)
(if
(local.get $0)
(loop $while-in
@@ -523,7 +543,7 @@
)
)
)
- (func $ifChainEmpty (; 32 ;) (; has Stack IR ;) (param $0 i32) (result i32)
+ (func $ifChainEmpty (; 37 ;) (; has Stack IR ;) (param $0 i32) (result i32)
(if
(i32.eq
(local.get $0)
@@ -535,12 +555,12 @@
)
(i32.const 0)
)
- (func $heap8NoShift (; 33 ;) (; has Stack IR ;) (param $0 i32) (result i32)
+ (func $heap8NoShift (; 38 ;) (; has Stack IR ;) (param $0 i32) (result i32)
(i32.load8_s
(local.get $0)
)
)
- (func $conditionalTypeFun (; 34 ;) (; has Stack IR ;)
+ (func $conditionalTypeFun (; 39 ;) (; has Stack IR ;)
(drop
(if (result i32)
(call $return_int)
@@ -566,7 +586,7 @@
)
)
)
- (func $loadSigned (; 35 ;) (; has Stack IR ;) (param $0 i32)
+ (func $loadSigned (; 40 ;) (; has Stack IR ;) (param $0 i32)
(call $loadSigned
(i32.load8_s
(local.get $0)
@@ -632,13 +652,10 @@
)
)
)
- (func $z (; 36 ;) (; has Stack IR ;) (param $0 f32)
- (nop)
- )
- (func $w (; 37 ;) (; has Stack IR ;) (result f64)
+ (func $w (; 41 ;) (; has Stack IR ;) (result f64)
(f64.const 0)
)
- (func $globalOpts (; 38 ;) (; has Stack IR ;)
+ (func $globalOpts (; 42 ;) (; has Stack IR ;)
(local $0 i32)
(i32.store8
(i32.const 13)
@@ -668,7 +685,7 @@
(local.get $0)
)
)
- (func $dropCallImport (; 39 ;) (; has Stack IR ;)
+ (func $dropCallImport (; 43 ;) (; has Stack IR ;)
(if
(call $return_int)
(drop
@@ -676,7 +693,7 @@
)
)
)
- (func $loophi (; 40 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32)
+ (func $loophi (; 44 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32)
(local $2 i32)
(loop $while-in
(block $while-out
@@ -706,7 +723,7 @@
)
)
)
- (func $loophi2 (; 41 ;) (; has Stack IR ;) (result i32)
+ (func $loophi2 (; 45 ;) (; has Stack IR ;) (result i32)
(local $0 i32)
(local $1 i32)
(local $2 i32)
@@ -739,7 +756,7 @@
)
(local.get $1)
)
- (func $loophi2b (; 42 ;) (; has Stack IR ;) (result i32)
+ (func $loophi2b (; 46 ;) (; has Stack IR ;) (result i32)
(local $0 i32)
(local $1 i32)
(loop $label$continue$L7
@@ -771,7 +788,7 @@
)
(local.get $0)
)
- (func $relooperJumpThreading (; 43 ;) (; has Stack IR ;) (param $0 i32) (result i32)
+ (func $relooperJumpThreading (; 47 ;) (; has Stack IR ;) (param $0 i32) (result i32)
(block $__rjto$0
(block $__rjti$0
(if
@@ -940,7 +957,7 @@
)
(local.get $0)
)
- (func $relooperJumpThreading__ZN4game14preloadweaponsEv (; 44 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32)
+ (func $relooperJumpThreading__ZN4game14preloadweaponsEv (; 48 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32)
(loop $while-in
(block $__rjti$1
(if
@@ -965,7 +982,7 @@
(br $while-in)
)
)
- (func $relooperJumpThreading_irreducible (; 45 ;) (; has Stack IR ;) (param $0 i32)
+ (func $relooperJumpThreading_irreducible (; 49 ;) (; has Stack IR ;) (param $0 i32)
(local $1 i32)
(if
(i32.eq
@@ -1017,7 +1034,7 @@
)
)
)
- (func $__Z12multi_varargiz (; 46 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
+ (func $__Z12multi_varargiz (; 50 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
(if
(local.get $3)
(loop $while-in
@@ -1034,10 +1051,10 @@
)
)
)
- (func $jumpThreadDrop (; 47 ;) (; has Stack IR ;) (result i32)
+ (func $jumpThreadDrop (; 51 ;) (; has Stack IR ;) (result i32)
(call $return_int)
)
- (func $dropIgnoredImportInIf (; 48 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32)
+ (func $dropIgnoredImportInIf (; 52 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32)
(if
(local.get $0)
(drop
@@ -1047,7 +1064,7 @@
)
)
)
- (func $dropIgnoredImportsInIf (; 49 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32)
+ (func $dropIgnoredImportsInIf (; 53 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32)
(drop
(if (result i32)
(local.get $0)
@@ -1060,7 +1077,7 @@
)
)
)
- (func $store_fround (; 50 ;) (; has Stack IR ;) (param $0 i32)
+ (func $store_fround (; 54 ;) (; has Stack IR ;) (param $0 i32)
(f64.store
(i32.const 80)
(f64.promote_f32
@@ -1070,7 +1087,7 @@
)
)
)
- (func $relocatableAndModules (; 51 ;) (; has Stack IR ;) (result i32)
+ (func $relocatableAndModules (; 55 ;) (; has Stack IR ;) (result i32)
(call_indirect (type $FUNCSIG$v)
(i32.const 10)
)
@@ -1083,7 +1100,10 @@
(i32.const 30)
)
)
- (func $keepAlive (; 52 ;) (; has Stack IR ;)
+ (func $exported_f32_user (; 56 ;) (; has Stack IR ;) (param $0 i32) (param $1 f32) (param $2 f64) (result f32)
+ (local.get $1)
+ )
+ (func $keepAlive (; 57 ;) (; has Stack IR ;)
(call_indirect (type $FUNCSIG$vi)
(i32.const 0)
(i32.const 17)
@@ -1122,39 +1142,10 @@
)
)
)
- (func $vi (; 53 ;) (; has Stack IR ;) (param $0 i32)
+ (func $vi (; 58 ;) (; has Stack IR ;) (param $0 i32)
(nop)
)
- (func $ii (; 54 ;) (; has Stack IR ;) (param $0 i32) (result i32)
+ (func $ii (; 59 ;) (; has Stack IR ;) (param $0 i32) (result i32)
(local.get $0)
)
- (func $legalstub$conversions (; 55 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64)
- (nop)
- )
- (func $legalstub$frem_float (; 56 ;) (; has Stack IR ;) (result f64)
- (f64.promote_f32
- (f32.demote_f64
- (call $f64-rem
- (f64.const 5.5)
- (f64.const 1.2000000476837158)
- )
- )
- )
- )
- (func $legalstub$fr (; 57 ;) (; has Stack IR ;) (param $0 f64)
- (nop)
- )
- (func $legalstub$ceiling_32_64 (; 58 ;) (; has Stack IR ;) (param $0 f64) (param $1 f64)
- (nop)
- )
- (func $legalstub$bitcasts (; 59 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64)
- (nop)
- )
- (func $legalstub$exported_f32_user (; 60 ;) (; has Stack IR ;) (param $0 i32) (param $1 f64) (param $2 f64) (result f64)
- (f64.promote_f32
- (f32.demote_f64
- (local.get $1)
- )
- )
- )
)