summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.clamp
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit.fromasm.clamp')
-rw-r--r--test/unit.fromasm.clamp117
1 files changed, 59 insertions, 58 deletions
diff --git a/test/unit.fromasm.clamp b/test/unit.fromasm.clamp
index b110204f9..4393c362c 100644
--- a/test/unit.fromasm.clamp
+++ b/test/unit.fromasm.clamp
@@ -29,7 +29,7 @@
(export "pick" (func $big_negative))
(export "doubleCompares" (func $doubleCompares))
(export "intOps" (func $intOps))
- (export "conversions" (func $conversions))
+ (export "conversions" (func $legalstub$conversions))
(export "switcher" (func $switcher))
(export "frem" (func $frem))
(export "frem_float" (func $legalstub$frem_float))
@@ -61,6 +61,7 @@
(export "dropCallImport" (func $dropCallImport))
(export "loophi" (func $loophi))
(export "loophi2" (func $loophi2))
+ (export "loophi2b" (func $loophi2b))
(export "relooperJumpThreading" (func $relooperJumpThreading))
(export "relooperJumpThreading__ZN4game14preloadweaponsEv" (func $relooperJumpThreading__ZN4game14preloadweaponsEv))
(export "__Z12multi_varargiz" (func $__Z12multi_varargiz))
@@ -98,8 +99,6 @@
(f64.const 1.2)
)
(func $doubleCompares (param $0 f64) (param $1 f64) (result f64)
- (local $2 f64)
- (local $3 i32)
(if
(f64.gt
(get_local $0)
@@ -111,7 +110,7 @@
)
(if
(f64.gt
- (get_local $2)
+ (get_local $0)
(f64.const 0)
)
(return
@@ -120,7 +119,7 @@
)
(if
(i32.gt_s
- (get_local $3)
+ (get_global $n)
(i32.const 0)
)
(return
@@ -138,8 +137,7 @@
)
(get_local $1)
)
- (func $intOps (result i32)
- (local $0 i32)
+ (func $intOps (param $0 i32) (result i32)
(i32.eqz
(get_local $0)
)
@@ -170,18 +168,16 @@
)
)
)
- (func $conversions
- (local $0 f64)
- (local $1 f32)
+ (func $conversions (param $0 i32) (param $1 f64) (param $2 f32)
(drop
(call $f64-to-int
- (get_local $0)
+ (get_local $1)
)
)
(drop
(call $f64-to-int
(f64.promote/f32
- (get_local $1)
+ (get_local $2)
)
)
)
@@ -280,21 +276,7 @@
)
)
(func $big_uint_div_u (result i32)
- (local $0 i32)
- (local $1 i32)
- (set_local $0
- (i32.const -1)
- )
- (if (result i32)
- (tee_local $1
- (i32.const 2)
- )
- (i32.div_u
- (get_local $0)
- (get_local $1)
- )
- (i32.const 0)
- )
+ (i32.const 2147483647)
)
(func $fr (param $0 f32)
(nop)
@@ -317,9 +299,7 @@
(i32.const 9)
)
)
- (func $smallCompare (result i32)
- (local $0 i32)
- (local $1 i32)
+ (func $smallCompare (param $0 i32) (param $1 i32) (result i32)
(if
(i32.lt_s
(get_local $0)
@@ -843,6 +823,38 @@
)
(get_local $1)
)
+ (func $loophi2b (result i32)
+ (local $0 i32)
+ (local $1 i32)
+ (loop $label$continue$L7
+ (block $label$break$L7
+ (set_local $0
+ (i32.const 0)
+ )
+ (loop $while-in
+ (set_local $1
+ (get_local $0)
+ )
+ (if
+ (call $return_int)
+ (br_if $label$break$L7
+ (get_local $1)
+ )
+ )
+ (br_if $while-in
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ )
+ )
+ (br $label$continue$L7)
+ )
+ )
+ (get_local $0)
+ )
(func $relooperJumpThreading (param $0 i32) (result i32)
(block $__rjto$0
(block $__rjti$0
@@ -1012,33 +1024,28 @@
)
(get_local $0)
)
- (func $relooperJumpThreading__ZN4game14preloadweaponsEv
- (local $0 i32)
- (local $1 i32)
- (local $2 i32)
- (local $3 i32)
- (local $4 i32)
+ (func $relooperJumpThreading__ZN4game14preloadweaponsEv (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 $__rjto$1
(block $__rjti$1
(if
- (get_local $0)
+ (get_local $1)
(br_if $__rjti$1
(i32.eqz
- (get_local $1)
+ (get_local $2)
)
)
(br_if $__rjti$1
(i32.eqz
- (get_local $2)
+ (get_local $3)
)
)
)
(br $while-in)
)
(i32.store
- (get_local $3)
(get_local $4)
+ (get_local $5)
)
)
(br $while-in)
@@ -1096,11 +1103,9 @@
)
)
)
- (func $__Z12multi_varargiz (param $0 i32)
- (local $1 i32)
- (local $2 i32)
+ (func $__Z12multi_varargiz (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
(if
- (get_local $1)
+ (get_local $3)
(loop $while-in
(br_if $while-in
(i32.eqz
@@ -1187,7 +1192,6 @@
)
)
(func $keepAlive
- (local $0 i32)
(drop
(call $sqrts
(f64.const 3.14159)
@@ -1208,24 +1212,12 @@
(f64.const 100)
)
)
- (block $__inlined_func$autoDrop
- (br_if $__inlined_func$autoDrop
- (i32.eq
- (tee_local $0
- (i32.const 52)
- )
- (i32.const 17)
- )
- )
- )
(call_indirect $FUNCSIG$vi
(i32.const 0)
(i32.const 17)
)
(call_indirect $FUNCSIG$vi
- (tee_local $0
- (i32.const 0)
- )
+ (i32.const 0)
(block (result i32)
(set_global $Int
(i32.const 1)
@@ -1254,6 +1246,15 @@
(func $ii (param $0 i32) (result i32)
(get_local $0)
)
+ (func $legalstub$conversions (param $0 i32) (param $1 f64) (param $2 f64)
+ (call $conversions
+ (get_local $0)
+ (get_local $1)
+ (f32.demote/f64
+ (get_local $2)
+ )
+ )
+ )
(func $legalstub$frem_float (result f64)
(f64.promote/f32
(call $frem_float)