summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/inlining-optimizing.txt12
-rw-r--r--test/passes/inlining-optimizing.wast17
-rw-r--r--test/passes/safe-heap.txt50
-rw-r--r--test/passes/translate-to-fuzz.txt1533
4 files changed, 791 insertions, 821 deletions
diff --git a/test/passes/inlining-optimizing.txt b/test/passes/inlining-optimizing.txt
index 19c580063..8079d818a 100644
--- a/test/passes/inlining-optimizing.txt
+++ b/test/passes/inlining-optimizing.txt
@@ -41,3 +41,15 @@
(unreachable)
)
)
+(module
+ (type $0 (func (result i32)))
+ (type $1 (func (result i64)))
+ (memory $0 (shared 1 1))
+ (func $1 (type $1) (result i64)
+ (i32.atomic.store16
+ (i32.const 0)
+ (i32.const 0)
+ )
+ (i64.const 0)
+ )
+)
diff --git a/test/passes/inlining-optimizing.wast b/test/passes/inlining-optimizing.wast
index 4f4f348a6..aac4706fe 100644
--- a/test/passes/inlining-optimizing.wast
+++ b/test/passes/inlining-optimizing.wast
@@ -85,4 +85,19 @@
(unreachable) ;; void function but having unreachable body, when inlined, type must be fixed
)
)
-
+(module
+ (memory $0 (shared 1 1))
+ (func $0 (result i32)
+ (i32.atomic.store16
+ (i32.const 0)
+ (i32.const 0)
+ )
+ (i32.const 1)
+ )
+ (func $1 (result i64)
+ (drop
+ (call $0)
+ )
+ (i64.const 0)
+ )
+)
diff --git a/test/passes/safe-heap.txt b/test/passes/safe-heap.txt
index f34dd7455..144766f1f 100644
--- a/test/passes/safe-heap.txt
+++ b/test/passes/safe-heap.txt
@@ -189,8 +189,14 @@
)
(call $segfault)
)
- (i32.atomic.load8_s
- (get_local $2)
+ (i32.shr_s
+ (i32.shl
+ (i32.atomic.load8_u
+ (get_local $2)
+ )
+ (i32.const 24)
+ )
+ (i32.const 24)
)
)
(func $SAFE_HEAP_LOAD_i32_1_1 (param $0 i32) (param $1 i32) (result i32)
@@ -346,8 +352,14 @@
)
(call $alignfault)
)
- (i32.atomic.load16_s
- (get_local $2)
+ (i32.shr_s
+ (i32.shl
+ (i32.atomic.load16_u
+ (get_local $2)
+ )
+ (i32.const 16)
+ )
+ (i32.const 16)
)
)
(func $SAFE_HEAP_LOAD_i32_2_2 (param $0 i32) (param $1 i32) (result i32)
@@ -799,8 +811,14 @@
)
(call $segfault)
)
- (i64.atomic.load8_s
- (get_local $2)
+ (i64.shr_s
+ (i64.shl
+ (i64.atomic.load8_u
+ (get_local $2)
+ )
+ (i64.const 56)
+ )
+ (i64.const 56)
)
)
(func $SAFE_HEAP_LOAD_i64_1_1 (param $0 i32) (param $1 i32) (result i64)
@@ -956,8 +974,14 @@
)
(call $alignfault)
)
- (i64.atomic.load16_s
- (get_local $2)
+ (i64.shr_s
+ (i64.shl
+ (i64.atomic.load16_u
+ (get_local $2)
+ )
+ (i64.const 48)
+ )
+ (i64.const 48)
)
)
(func $SAFE_HEAP_LOAD_i64_2_2 (param $0 i32) (param $1 i32) (result i64)
@@ -1201,8 +1225,14 @@
)
(call $alignfault)
)
- (i64.atomic.load32_s
- (get_local $2)
+ (i64.shr_s
+ (i64.shl
+ (i64.atomic.load32_u
+ (get_local $2)
+ )
+ (i64.const 32)
+ )
+ (i64.const 32)
)
)
(func $SAFE_HEAP_LOAD_i64_4_4 (param $0 i32) (param $1 i32) (result i64)
diff --git a/test/passes/translate-to-fuzz.txt b/test/passes/translate-to-fuzz.txt
index fca9307df..f088010f7 100644
--- a/test/passes/translate-to-fuzz.txt
+++ b/test/passes/translate-to-fuzz.txt
@@ -1,17 +1,17 @@
(module
(type $FUNCSIG$ifi (func (param f32 i32) (result i32)))
- (type $FUNCSIG$i (func (result i32)))
- (type $FUNCSIG$j (func (result i64)))
+ (type $FUNCSIG$dj (func (param i64) (result f64)))
+ (type $FUNCSIG$f (func (result f32)))
(global $global$0 (mut f64) (f64.const 138413376))
(global $global$1 (mut f64) (f64.const 1.1754943508222875e-38))
(global $hangLimit (mut i32) (i32.const 100))
- (table 1 anyfunc)
- (elem (i32.const 0) $func_3)
- (memory $0 1 1)
+ (table 2 anyfunc)
+ (elem (i32.const 0) $func_0 $func_5)
+ (memory $0 (shared 1 1))
(data (i32.const 0) "\00C\00[\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
(export "func_0" (func $func_0))
(export "func_3" (func $func_3))
- (export "func_4" (func $func_4))
+ (export "func_5" (func $func_5))
(export "hangLimitInitializer" (func $hangLimitInitializer))
(func $func_0 (type $FUNCSIG$ifi) (param $0 f32) (param $1 i32) (result i32)
(block
@@ -20,7 +20,7 @@
(get_global $hangLimit)
)
(return
- (i32.const -2147483648)
+ (get_local $1)
)
)
(set_global $hangLimit
@@ -30,15 +30,141 @@
)
)
)
- (get_local $1)
+ (tee_local $1
+ (i32.eqz
+ (if (result i32)
+ (i32.eqz
+ (f64.le
+ (f64.const -2147483648)
+ (f64.const 8)
+ )
+ )
+ (i32.or
+ (i32.div_s
+ (if (result i32)
+ (i32.eqz
+ (loop $label$0 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (i32.const 24332)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block (result i32)
+ (loop $label$1
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (get_local $1)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (nop)
+ )
+ (br_if $label$0
+ (i32.eqz
+ (get_local $1)
+ )
+ )
+ (loop $label$3 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (get_local $1)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (i32.trunc_s/f64
+ (f64.const -9223372036854775808)
+ )
+ )
+ )
+ )
+ )
+ (block $label$4 (result i32)
+ (i32.load8_u offset=3
+ (i32.and
+ (br_if $label$4
+ (i32.const -44)
+ (i32.const 437327895)
+ )
+ (i32.const 31)
+ )
+ )
+ )
+ (block $label$5 (result i32)
+ (nop)
+ (return
+ (i32.const 84)
+ )
+ )
+ )
+ (block $label$6 (result i32)
+ (block $label$7
+ (block $label$8
+ (nop)
+ (nop)
+ )
+ (br_if $label$7
+ (i32.eqz
+ (get_local $1)
+ )
+ )
+ )
+ (get_local $1)
+ )
+ )
+ (i32.const 1048576)
+ )
+ (get_local $1)
+ )
+ )
+ )
)
- (func $func_1
+ (func $func_1 (result f64)
+ (local $0 i64)
+ (local $1 f32)
+ (local $2 i32)
+ (local $3 i64)
+ (local $4 f32)
+ (local $5 i32)
+ (local $6 f32)
(block
(if
(i32.eqz
(get_global $hangLimit)
)
- (return)
+ (return
+ (f64.const 61)
+ )
)
(set_global $hangLimit
(i32.sub
@@ -47,40 +173,15 @@
)
)
)
- (loop $label$0
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return)
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block $label$1
- (nop)
- (nop)
- )
- )
+ (get_global $global$1)
)
- (func $func_2 (param $0 f32) (result f64)
- (local $1 f32)
- (local $2 i32)
- (local $3 i32)
- (local $4 i32)
+ (func $func_2
(block
(if
(i32.eqz
(get_global $hangLimit)
)
- (return
- (f64.const 26471)
- )
+ (return)
)
(set_global $hangLimit
(i32.sub
@@ -89,157 +190,93 @@
)
)
)
- (call $deNan64
- (f64.mul
- (f64.const 1)
- (if (result f64)
- (select
- (block $label$10 (result i32)
- (if
- (i32.eqz
- (tee_local $2
- (i32.const -2147483648)
+ (block $label$0
+ (set_global $global$0
+ (loop $label$1 (result f64)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$2 (result f64)
+ (loop $label$3 (result f64)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
)
+ (return)
)
- (drop
- (i32.const -131072)
- )
- (block $label$11
- (br_if $label$11
- (tee_local $4
- (i32.const -128)
- )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
)
- (call $func_1)
)
)
- (return
- (f64.const 4)
- )
- )
- (tee_local $2
- (tee_local $3
- (get_local $3)
- )
- )
- (i32.load16_u offset=4
- (i32.and
- (i32.load offset=4 align=1
- (i32.and
- (loop $label$0 (result i32)
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (f64.const -nan:0xfffffffffffb5)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
- )
- )
+ (block $label$4 (result f64)
+ (loop $label$5
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
)
- (block $label$1 (result i32)
- (block $label$2
- (nop)
- (call $func_1)
- )
- (select
- (if (result i32)
- (get_local $3)
- (block $label$3 (result i32)
- (block $label$4
- (set_local $2
- (get_local $3)
- )
- (set_local $0
- (get_local $1)
- )
+ (return)
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (nop)
+ )
+ (call $deNan64
+ (f64.reinterpret/i64
+ (i64.extend_u/i32
+ (block $label$6 (result i32)
+ (loop $label$7
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
)
- (br $label$0)
+ (return)
)
- (if (result i32)
- (i32.eqz
- (get_local $3)
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
)
- (i32.const -123)
- (get_local $4)
)
)
- (tee_local $2
- (if (result i32)
- (i32.eqz
- (call $func_0
- (get_local $1)
- (i32.const 0)
- )
- )
- (block $label$5 (result i32)
- (loop $label$6
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (f64.const -33554432)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block
- (i64.store offset=4 align=1
- (i32.and
- (get_local $4)
- (i32.const 31)
- )
- (i64.const -1)
- )
- (br_if $label$6
- (get_local $2)
- )
- (f32.store offset=4
- (i32.and
- (i32.const -256)
- (i32.const 31)
- )
- (f32.const 2147483648)
- )
- )
- )
- (i32.load8_s offset=4
- (i32.and
- (i32.load16_u offset=3 align=1
- (i32.and
- (get_local $2)
- (i32.const 31)
- )
- )
- (i32.const 31)
- )
+ (block $label$8
+ (nop)
+ (block $label$9
+ (br_if $label$3
+ (i32.eqz
+ (i32.const 185342814)
)
)
- (block $label$7 (result i32)
- (block $label$8
- (nop)
- (loop $label$9
+ (i32.store offset=3 align=2
+ (i32.and
+ (loop $label$10 (result i32)
(block
(if
(i32.eqz
(get_global $hangLimit)
)
- (return
- (f64.const -8192)
- )
+ (return)
)
(set_global $hangLimit
(i32.sub
@@ -248,66 +285,52 @@
)
)
)
- (set_local $2
- (br_if $label$7
- (tee_local $4
- (if (result i32)
- (i32.eqz
- (get_local $4)
- )
- (get_local $2)
- (i32.const 1514756685)
- )
- )
- (i32.eqz
- (i32.load offset=2
- (i32.and
- (i32.const 514)
- (i32.const 31)
- )
+ (block (result i32)
+ (nop)
+ (br_if $label$10
+ (i32.const 1195902538)
+ )
+ (call $func_0
+ (call $deNan32
+ (f32.convert_u/i64
+ (i64.const 2251799813685248)
)
)
+ (i32.const 336464134)
)
)
)
+ (i32.const 31)
)
- (br $label$0)
+ (i32.const 27)
)
)
)
- (i32.const 2147483647)
+ )
+ (i32.reinterpret/f32
+ (f32.const 19533)
)
)
)
- (i32.const 31)
)
)
- (i32.const 31)
)
)
)
- (get_global $global$1)
- (block $label$12 (result f64)
- (call $func_1)
- (return
- (f64.const -140737488355328)
- )
- )
)
)
+ (nop)
)
)
- (func $func_3 (type $FUNCSIG$i) (result i32)
- (local $0 i32)
+ (func $func_3 (type $FUNCSIG$dj) (param $0 i64) (result f64)
(local $1 i64)
- (local $2 f64)
(block
(if
(i32.eqz
(get_global $hangLimit)
)
(return
- (get_local $0)
+ (f64.const -nan:0xffffffffffff9)
)
)
(set_global $hangLimit
@@ -317,171 +340,186 @@
)
)
)
- (block $label$0 (result i32)
+ (block $label$0 (result f64)
(nop)
- (return
- (i32.const -4194304)
- )
- )
- )
- (func $func_4 (type $FUNCSIG$j) (result i64)
- (local $0 i64)
- (local $1 f32)
- (local $2 i64)
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (i64.const 68719476736)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block $label$0
- (i64.store32 offset=4 align=2
- (i32.and
- (if (result i32)
- (i32.eqz
- (block $label$1 (result i32)
+ (block $label$1
+ (drop
+ (i64.shr_s
+ (loop $label$2 (result i64)
+ (block
(if
(i32.eqz
- (loop $label$2 (result i32)
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (i64.const 512)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
+ (get_global $hangLimit)
+ )
+ (return
+ (f64.const 9150713448007298)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$3 (result i64)
+ (f64.store offset=2 align=4
+ (i32.and
+ (i32.const 127)
+ (i32.const 31)
+ )
+ (f64.load offset=3
+ (i32.and
+ (i32.const -16777216)
+ (i32.const 31)
+ )
+ )
+ )
+ (i64.popcnt
+ (block $label$4 (result i64)
+ (br_if $label$1
+ (i32.load offset=1 align=1
+ (i32.and
+ (f64.gt
+ (br_if $label$0
+ (f64.const 7)
+ (i32.eqz
+ (call_indirect $FUNCSIG$ifi
+ (f32.const 2147483648)
+ (i32.const -28)
+ (i32.const 0)
+ )
+ )
+ )
+ (call $func_1)
)
- )
- )
- (block $label$3 (result i32)
- (return
- (get_local $2)
+ (i32.const 31)
)
)
)
- )
- (block $label$4
- (block $label$5
- (set_local $2
- (loop $label$6 (result i64)
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
+ (br_if $label$4
+ (if (result i64)
+ (i32.const 825692018)
+ (block $label$8 (result i64)
+ (loop $label$9
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (f64.const -nan:0xffffffffffff9)
+ )
)
- (return
- (get_local $0)
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
)
)
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
- )
+ (block $label$10
+ (nop)
+ (nop)
)
)
- (block (result i64)
- (block $label$7
- (drop
- (get_local $1)
+ (i64.load8_u
+ (block $label$11 (result i32)
+ (nop)
+ (i32.const -2)
+ )
+ )
+ )
+ (i64.shl
+ (if (result i64)
+ (f64.ge
+ (f64.const 4294967200)
+ (loop $label$12 (result f64)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (f64.const 16471262202863238)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (f64.const 1812599913)
)
- (br_if $label$5
- (i32.eqz
- (i32.const 1393493003)
+ )
+ (block $label$13 (result i64)
+ (i32.atomic.store8 offset=3
+ (i32.and
+ (i32.const 1026760786)
+ (i32.const 31)
)
+ (i32.const -32769)
)
+ (br $label$1)
)
- (br_if $label$6
- (i32.eqz
- (br_if $label$1
- (i32.const 32766)
- (i32.eqz
- (i32.const -73)
+ (block $label$14 (result i64)
+ (if
+ (i32.const 185339652)
+ (set_local $0
+ (select
+ (get_local $1)
+ (i64.const 9223372036854775807)
+ (if (result i32)
+ (i32.const 0)
+ (i32.const -21)
+ (i32.const 39)
+ )
)
)
+ (nop)
)
+ (br $label$1)
)
- (get_local $0)
)
- )
- )
- (call $func_1)
- )
- (block $label$8
- (drop
- (loop $label$9 (result f64)
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (get_local $2)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
+ (i64.div_u
+ (i64.ctz
+ (select
+ (get_local $0)
+ (i64.const 29041)
+ (select
+ (i32.const 256)
+ (i32.const 65535)
+ (call $func_0
+ (f32.const 1.7485578309992735e-21)
+ (i32.const 134217728)
+ )
+ )
)
)
+ (i64.const -131072)
)
- (f64.const 30079)
)
)
- )
- )
- (nop)
- )
- (call_indirect $FUNCSIG$i
- (i32.const 0)
- )
- )
- )
- (block $label$10 (result i32)
- (i32.store8 offset=22
- (i32.and
- (if (result i32)
- (i32.eqz
- (select
- (i32.const 6)
- (if (result i32)
- (i32.const 4103)
- (block $label$12 (result i32)
- (drop
- (i64.ctz
- (i64.const 17)
- )
+ (i32.atomic.load16_u offset=22
+ (i32.and
+ (if (result i32)
+ (i32.eqz
+ (i32.const 268435456)
)
- (return
- (i64.const 18505)
+ (block $label$5 (result i32)
+ (nop)
+ (br $label$1)
)
- )
- (f32.ne
- (loop $label$13 (result f32)
+ (loop $label$6 (result i32)
(block
(if
(i32.eqz
(get_global $hangLimit)
)
(return
- (i64.const 17728)
+ (f64.const 9030)
)
)
(set_global $hangLimit
@@ -491,110 +529,15 @@
)
)
)
- (block (result f32)
- (block $label$14
- (block $label$15
- (nop)
- (nop)
- )
- (if
- (i32.eqz
- (br_if $label$10
- (if (result i32)
- (if (result i32)
- (i32.const -65536)
- (i32.const -32768)
- (call_indirect $FUNCSIG$i
- (i32.const 0)
- )
- )
- (i32.const 454301983)
- (i32.const 18460)
- )
- (i32.const -64)
- )
- )
- (block $label$16
- (if
- (i32.const 1014178876)
- (if
- (i32.eqz
- (i32.const -116)
- )
- (nop)
- (i32.store16 offset=2 align=1
- (i32.and
- (i32.const -16)
- (i32.const 31)
- )
- (i32.load16_s offset=3
- (i32.and
- (block $label$17 (result i32)
- (nop)
- (i32.const 23528569)
- )
- (i32.const 31)
- )
- )
- )
- )
- (nop)
- )
- (br_if $label$16
- (i32.eqz
- (block $label$18 (result i32)
- (nop)
- (i32.const -93)
- )
- )
- )
- )
- (br_if $label$13
- (i32.eqz
- (i32.const 512)
- )
- )
- )
- )
- (br_if $label$13
- (i32.eqz
- (br_if $label$10
- (call $func_0
- (call $deNan32
- (f32.convert_u/i64
- (if (result i64)
- (i32.eqz
- (i32.const 8388608)
- )
- (get_local $0)
- (get_local $0)
- )
- )
- )
- (if (result i32)
- (i32.const 4)
- (i32.const 1196969301)
- (select
- (i32.const 64)
- (i32.trunc_s/f32
- (get_local $1)
- )
- (i32.const -2)
- )
- )
- )
- (i32.const -1048576)
- )
- )
- )
- (loop $label$19 (result f32)
+ (block (result i32)
+ (loop $label$7
(block
(if
(i32.eqz
(get_global $hangLimit)
)
(return
- (i64.const 357908754)
+ (f64.const 1797693134862315708145274e284)
)
)
(set_global $hangLimit
@@ -604,261 +547,232 @@
)
)
)
- (block $label$20 (result f32)
- (nop)
- (br $label$19)
- )
- )
- )
- )
- (call $deNan32
- (f32.floor
- (loop $label$21 (result f32)
(block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (get_local $0)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
- )
+ (nop)
+ (br_if $label$7
+ (i32.const 0)
)
+ (nop)
)
- (loop $label$22 (result f32)
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (get_local $0)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result f32)
- (br_if $label$21
- (i32.eqz
- (if (result i32)
- (i32.eqz
- (i32.const -4194304)
- )
- (i32.const 9537)
- (i32.const -262144)
- )
- )
- )
- (br_if $label$22
- (call $func_3)
- )
- (tee_local $1
- (get_local $1)
- )
- )
+ )
+ (br_if $label$6
+ (call $func_0
+ (f32.const 82)
+ (i32.const 770)
)
)
+ (call_indirect $FUNCSIG$ifi
+ (f32.const 1.1754943508222875e-38)
+ (i32.const -1)
+ (i32.const 0)
+ )
)
)
)
+ (i32.const 31)
)
+ )
+ )
+ )
+ )
+ )
+ )
+ (i64.const -1)
+ )
+ )
+ (f32.store offset=22
+ (i32.and
+ (i32.const 2147483647)
+ (i32.const 31)
+ )
+ (f32.const -1)
+ )
+ )
+ (return
+ (f64.const 18446744073709551615)
+ )
+ )
+ )
+ (func $func_4 (result f32)
+ (local $0 f32)
+ (local $1 i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (f32.const -9223372036854775808)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$0 (result f32)
+ (return
+ (f32.const -1048576)
+ )
+ )
+ )
+ (func $func_5 (type $FUNCSIG$f) (result f32)
+ (local $0 f32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 f64)
+ (local $4 i64)
+ (local $5 i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (get_local $0)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (call $deNan32
+ (f32.convert_s/i64
+ (if (result i64)
+ (loop $label$0 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (f32.const 28726)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (i32.const -76)
+ )
+ (block $label$1 (result i64)
+ (nop)
+ (block $label$2 (result i64)
+ (drop
+ (if (result f32)
+ (i32.const -64)
+ (get_local $0)
+ (block $label$5 (result f32)
+ (drop
+ (get_local $2)
+ )
+ (return
+ (f32.const 1.9604099208437475e-30)
+ )
+ )
+ )
+ )
+ (return
+ (get_local $0)
+ )
+ )
+ )
+ (block $label$6 (result i64)
+ (set_local $3
+ (call $deNan64
+ (f64.copysign
+ (get_global $global$1)
+ (block $label$7 (result f64)
+ (block $label$8
+ (br_if $label$8
(i32.load offset=4 align=2
(i32.and
- (select
- (call $func_3)
- (i32.const 1)
- (call $func_0
- (call $deNan32
+ (i32.load16_u offset=4
+ (i32.and
+ (select
+ (get_local $1)
(select
- (tee_local $1
- (f32.const 9223372036854775808)
- )
- (f32.const -1)
- (if (result i32)
- (i32.eqz
- (i32.const 404363289)
- )
- (i32.const 32767)
- (block $label$11 (result i32)
- (nop)
- (i64.eqz
- (i64.popcnt
- (get_local $0)
- )
- )
+ (call $func_0
+ (get_local $0)
+ (select
+ (i32.const 65535)
+ (get_local $1)
+ (i32.const 1999974947)
)
)
+ (i32.const 64)
+ (get_local $5)
)
+ (get_local $2)
)
- (i32.const 4)
+ (i32.const 31)
)
)
(i32.const 31)
)
)
)
- )
- (if (result i32)
- (call_indirect $FUNCSIG$i
- (i32.const 0)
- )
- (block $label$23 (result i32)
- (return
- (i64.const -2)
- )
- )
- (block $label$24 (result i32)
- (i32.store16 offset=22 align=1
- (i32.and
- (i32.load16_s offset=4 align=1
- (i32.and
- (i32.const 125568104)
- (i32.const 31)
- )
+ (loop $label$9
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (get_local $0)
)
- (i32.const 31)
)
- (call $func_3)
- )
- (i32.load16_s offset=3 align=1
- (i32.and
- (call $func_0
- (f32.const 0)
- (i32.load16_u offset=4
- (i32.and
- (if (result i32)
- (call_indirect $FUNCSIG$i
- (i32.const 0)
- )
- (select
- (select
- (i32.const 1734962792)
- (i32.const -4096)
- (i32.const 218824716)
- )
- (i32.const -1073741824)
- (i32.const 40)
- )
- (block $label$25 (result i32)
- (block $label$26
- (nop)
- (block $label$27
- (nop)
- (f64.store offset=4 align=4
- (call $func_0
- (f32.const 9223372036854775808)
- (f32.eq
- (f32.const 18446744073709551615)
- (f32.load offset=4
- (i32.and
- (i32.const 524288)
- (i32.const 31)
- )
- )
- )
- )
- (f64.const -1099511627776)
- )
- )
- )
- (i32.const 128)
- )
- )
- (i32.const 31)
- )
- )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
)
- (i32.const 31)
)
)
- )
- )
- (i32.const 335937919)
- )
- (i32.const 31)
- )
- (if (result i32)
- (i32.eqz
- (call $func_3)
- )
- (block $label$28 (result i32)
- (block $label$29
- (if
- (i32.eqz
- (block $label$30 (result i32)
- (nop)
- (call_indirect $FUNCSIG$i
+ (block $label$10
+ (drop
+ (call_indirect $FUNCSIG$ifi
+ (f32.const 2097640320)
+ (i32.eqz
+ (select
+ (i32.const -128)
+ (get_local $2)
+ (get_local $2)
+ )
+ )
(i32.const 0)
)
)
- )
- (block $label$31
- (nop)
- (nop)
- )
- (block $label$32
- (nop)
- )
- )
- (drop
- (i64.div_s
- (block $label$33 (result i64)
- (call $func_1)
- (i64.const -94)
- )
- (tee_local $2
- (loop $label$34 (result i64)
- (block
+ (if
+ (tee_local $2
+ (get_local $2)
+ )
+ (block $label$11
+ (nop)
+ (call $func_2)
+ )
+ (block $label$12
+ (block $label$13
+ (nop)
(if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (get_local $2)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
- )
- )
- )
- (block (result i64)
- (block $label$35
+ (i32.const 1936882040)
(nop)
- (f64.store offset=4 align=2
- (i32.and
- (i32.const 127)
- (i32.const 31)
- )
- (f64.const -2251799813685248)
- )
- )
- (br_if $label$34
- (i32.const 471406943)
- )
- (select
- (get_local $0)
- (get_local $0)
- (loop $label$36 (result i32)
+ (loop $label$14
(block
(if
(i32.eqz
(get_global $hangLimit)
)
(return
- (get_local $0)
+ (f32.const 4294967296)
)
)
(set_global $hangLimit
@@ -868,84 +782,53 @@
)
)
)
- (select
- (i32.const 23130)
- (i32.const 1111901516)
- (block $label$37 (result i32)
- (nop)
- (i32.const -2147483648)
+ (block
+ (nop)
+ (br_if $label$14
+ (i32.eqz
+ (i32.const -2147483648)
+ )
)
+ (nop)
)
)
)
)
+ (nop)
)
)
)
)
)
(return
- (get_local $2)
- )
- )
- (block $label$39 (result i32)
- (drop
- (i64.const 255)
+ (get_local $0)
)
- (call $func_3)
- )
- )
- )
- (drop
- (block $label$40 (result f32)
- (return
- (i64.const -562949953421312)
- )
- )
- )
- (f32.ne
- (f32.const 217.36842346191406)
- (f32.load offset=4
- (i32.and
- (i32.const 822703163)
- (i32.const 31)
)
)
)
)
- (select
- (i32.const 1931754023)
- (i32.const -128)
- (block $label$41 (result i32)
- (call $func_1)
- (i32.const 1701396008)
+ (i64.atomic.rmw8_u.xor offset=4
+ (i32.and
+ (i32.const 32767)
+ (i32.const 31)
)
+ (i64.const 9223372036854775807)
)
)
- (i32.const 31)
)
- (get_local $2)
- )
- (return
- (get_local $2)
)
)
)
- (func $func_5 (result i64)
- (local $0 i32)
- (local $1 i32)
- (local $2 f32)
+ (func $func_6 (param $0 f32) (param $1 f32) (result f64)
+ (local $2 i64)
(local $3 f32)
- (local $4 f32)
- (local $5 i64)
- (local $6 i64)
(block
(if
(i32.eqz
(get_global $hangLimit)
)
(return
- (get_local $6)
+ (f64.const -nan:0xffffffffffffa)
)
)
(set_global $hangLimit
@@ -955,145 +838,175 @@
)
)
)
- (drop
+ (block $label$0 (result f64)
(drop
- (block $label$0
- (loop $label$1
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (i64.const 6364521229224202323)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
+ (i32.atomic.load8_u offset=4
+ (i32.atomic.load offset=4
+ (i32.and
+ (loop $label$1 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (f64.const 1.4089981056487379e-134)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
)
- )
- )
- (nop)
- )
- (f64.store offset=4 align=1
- (block $label$9
- (if
- (i32.eqz
- (if (result i32)
- (if (result i32)
- (if (result i32)
- (f64.eq
- (f64.const 7196)
- (f64.const -562949953421312)
- )
- (call $func_3)
- (block $label$10 (result i32)
- (set_global $global$0
- (f64.const 1.9804914402226382e-202)
- )
- (return
- (get_local $6)
- )
- )
+ (block (result i32)
+ (block $label$2
+ (if
+ (i32.eqz
+ (i32.const 119342106)
)
- (block $label$11 (result i32)
- (loop $label$12
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (i64.const -281474976710656)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
- )
- )
- )
- (set_global $global$0
- (f64.const 127)
- )
- )
- (i32.load8_u offset=2
+ (block $label$3
+ (i64.atomic.store32 offset=3
(i32.and
- (i32.trunc_u/f32
- (f32.const -33554432)
- )
+ (i32.const 127)
(i32.const 31)
)
+ (i64.const 651625613631293707)
)
)
- (block $label$13 (result i32)
- (call_indirect $FUNCSIG$i
- (i32.const 0)
- )
- )
+ (call $func_2)
)
- (block $label$14 (result i32)
- (nop)
- (loop $label$18 (result i32)
- (block
- (if
- (i32.eqz
- (get_global $hangLimit)
- )
- (return
- (i64.const -4096)
- )
- )
- (set_global $hangLimit
- (i32.sub
- (get_global $hangLimit)
- (i32.const 1)
+ (f64.store offset=22
+ (i32.and
+ (i32.atomic.rmw8_u.xchg offset=22
+ (i32.and
+ (block $label$4 (result i32)
+ (nop)
+ (br $label$1)
)
+ (i32.const 31)
)
- )
- (block (result i32)
- (block $label$19
- (set_local $6
- (i64.const 36028797018963968)
+ (select
+ (i32.atomic.rmw16_u.cmpxchg offset=4
+ (i32.and
+ (i32.const 37)
+ (i32.const 31)
+ )
+ (select
+ (i32.atomic.rmw16_u.cmpxchg offset=22
+ (i32.and
+ (f32.ge
+ (get_local $0)
+ (f32.const -2147483648)
+ )
+ (i32.const 31)
+ )
+ (loop $label$6 (result i32)
+ (block
+ (if
+ (i32.eqz
+ (get_global $hangLimit)
+ )
+ (return
+ (f64.const 1791883197976824701597689e116)
+ )
+ )
+ (set_global $hangLimit
+ (i32.sub
+ (get_global $hangLimit)
+ (i32.const 1)
+ )
+ )
+ )
+ (block (result i32)
+ (set_local $2
+ (i64.const -55)
+ )
+ (br_if $label$6
+ (i32.eqz
+ (i32.const 131072)
+ )
+ )
+ (i32.const -134217728)
+ )
+ )
+ (i32.const 924871013)
+ )
+ (call_indirect $FUNCSIG$ifi
+ (call $deNan32
+ (f32.sub
+ (call $deNan32
+ (f32.add
+ (get_local $0)
+ (f32.const 4.581032111437074e-16)
+ )
+ )
+ (tee_local $0
+ (block $label$7 (result f32)
+ (nop)
+ (get_local $0)
+ )
+ )
+ )
+ )
+ (i32.const 65446)
+ (i32.const 0)
+ )
+ (call_indirect $FUNCSIG$ifi
+ (call $deNan32
+ (f32.sub
+ (get_local $3)
+ (f32.const -4096)
+ )
+ )
+ (i32.const -2147483648)
+ (i32.const 0)
+ )
+ )
+ (i32.const -42)
)
- (set_local $6
- (tee_local $6
- (call $func_4)
+ (call_indirect $FUNCSIG$ifi
+ (call_indirect $FUNCSIG$f
+ (i32.const -134217728)
)
+ (i32.const -2147483648)
+ (i32.const 0)
)
- )
- (br_if $label$18
- (tee_local $1
- (i32.const 442457430)
+ (block $label$5 (result i32)
+ (drop
+ (call $func_0
+ (tee_local $1
+ (get_local $3)
+ )
+ (call_indirect $FUNCSIG$ifi
+ (get_local $3)
+ (i32.const 2)
+ (i32.const 0)
+ )
+ )
+ )
+ (br $label$1)
)
)
- (i32.const -262144)
)
+ (i32.const 31)
)
+ (f64.const 1.8443913781292733e-124)
)
- (get_local $1)
)
- )
- (set_local $1
- (i32.const -2147483648)
- )
- (block $label$20
- (nop)
+ (br_if $label$1
+ (i32.const 811742759)
+ )
+ (i32.const 19806)
)
)
- (return
- (get_local $5)
- )
- )
- (return
- (i64.const 819399075040401932)
+ (i32.const 31)
)
)
)
)
+ (f64.const 3495358995652723316329699e63)
)
)
(func $hangLimitInitializer