2018-01-10 13:09:05 +01:00
|
|
|
(module
|
|
|
|
(type $iiv (func (param i32 i32)))
|
2018-03-12 14:06:39 +01:00
|
|
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
2018-01-10 13:09:05 +01:00
|
|
|
(type $v (func))
|
2018-05-21 18:48:29 +02:00
|
|
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
2018-01-10 13:09:05 +01:00
|
|
|
(global $retain-i32/si (mut i32) (i32.const 0))
|
|
|
|
(global $retain-i32/ui (mut i32) (i32.const 0))
|
|
|
|
(memory $0 1)
|
2018-05-14 16:55:55 +02:00
|
|
|
(data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s")
|
2018-01-10 13:09:05 +01:00
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
2018-02-04 07:51:40 +01:00
|
|
|
(func $retain-i32/test (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
2018-05-06 00:00:54 +02:00
|
|
|
(nop)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(func $start (; 2 ;) (type $v)
|
2018-01-10 13:09:05 +01:00
|
|
|
(local $0 i32)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 0)
|
|
|
|
(i32.const 127)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 127)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 127)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 127)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -1)
|
|
|
|
(i32.const 127)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 127)
|
|
|
|
(i32.const -1)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 0)
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -128)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -128)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -1)
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -128)
|
|
|
|
(i32.const -1)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 127)
|
|
|
|
(i32.const 127)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -128)
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 127)
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -128)
|
|
|
|
(i32.const 127)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 0)
|
|
|
|
(i32.const 255)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 255)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 255)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 255)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -1)
|
|
|
|
(i32.const 255)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 255)
|
|
|
|
(i32.const -1)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 255)
|
|
|
|
(i32.const 255)
|
|
|
|
)
|
2018-05-23 11:32:12 +02:00
|
|
|
(block $break|0
|
|
|
|
(set_local $0
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
2018-05-25 15:59:17 +02:00
|
|
|
(loop $repeat|0
|
2018-05-23 11:32:12 +02:00
|
|
|
(br_if $break|0
|
|
|
|
(i32.gt_s
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 255)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 0)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 1)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -1)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -128)
|
2018-01-10 13:09:05 +01:00
|
|
|
(get_local $0)
|
2018-05-23 11:32:12 +02:00
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 127)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
2018-01-10 13:09:05 +01:00
|
|
|
(i32.const 255)
|
2018-05-23 11:32:12 +02:00
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -32768)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 32767)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 65535)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const 2147483647)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -2147483648)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(call $retain-i32/test
|
|
|
|
(i32.const -1)
|
|
|
|
(get_local $0)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
2018-05-23 11:32:12 +02:00
|
|
|
(set_local $0
|
|
|
|
(i32.add
|
2018-01-10 13:09:05 +01:00
|
|
|
(get_local $0)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-05-25 15:59:17 +02:00
|
|
|
(br $repeat|0)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const -1)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/si)
|
|
|
|
(i32.const -1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 78)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const -1)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/si)
|
|
|
|
(i32.const -1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 81)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const -2)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/si)
|
|
|
|
(i32.const -2)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 84)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/si)
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 87)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/si)
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 90)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const -127)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/si)
|
|
|
|
(i32.const -127)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 93)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/si)
|
|
|
|
(i32.const -128)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 96)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/si)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 99)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/si)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 102)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(get_global $retain-i32/si)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 105)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/si
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/si)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 108)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/ui
|
|
|
|
(i32.const 255)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/ui)
|
|
|
|
(i32.const 255)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 113)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/ui
|
|
|
|
(i32.const 255)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/ui)
|
|
|
|
(i32.const 255)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 116)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/ui
|
|
|
|
(i32.const 254)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/ui)
|
|
|
|
(i32.const 254)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 119)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/ui
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/ui)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 122)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/ui
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/ui)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 125)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/ui
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.ne
|
|
|
|
(get_global $retain-i32/ui)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 128)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
(set_global $retain-i32/ui
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(get_global $retain-i32/ui)
|
2018-02-04 07:51:40 +01:00
|
|
|
(block
|
2018-05-21 18:48:29 +02:00
|
|
|
(call $~lib/env/abort
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 0)
|
2018-05-14 16:55:55 +02:00
|
|
|
(i32.const 8)
|
2018-02-04 07:51:40 +01:00
|
|
|
(i32.const 131)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2018-01-10 13:09:05 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|