blob: 491abf98f923272a2f51efed7da975bdfe53ef95 [file] [log] [blame]
(module
(type $FUNCSIG$vdji (func (param f64 i64 i32)))
(type $FUNCSIG$j (func (result i64)))
(type $legaltype$illegalImport (func (param f64 i32 i32 i32)))
(type $legaltype$illegalImportResult (func (result i32)))
(import "env" "illegalImport" (func $illegalImport (param f64 i64 i32)))
(import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "memory" (memory $0 256 256))
(import "env" "table" (table 0 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
(export "test64" (func $test64))
(export "illegalParam" (func $legalstub$illegalParam))
(export "illegalResult" (func $legalstub$illegalResult))
(func $loads
(local $i i32)
(local $f f32)
(local $d f64)
(set_local $i
(i32.load8_s
(i32.const 100)
)
)
(set_local $i
(i32.load8_s
(i32.const 101)
)
)
(set_local $i
(i32.load16_s
(i32.const 102)
)
)
(set_local $i
(i32.load16_s
(i32.const 103)
)
)
(set_local $i
(i32.load16_s align=1
(i32.const 104)
)
)
(set_local $i
(i32.load16_s
(i32.const 105)
)
)
(set_local $i
(i32.load
(i32.const 106)
)
)
(set_local $i
(i32.load
(i32.const 107)
)
)
(set_local $i
(i32.load align=1
(i32.const 108)
)
)
(set_local $i
(i32.load align=2
(i32.const 109)
)
)
(set_local $i
(i32.load
(i32.const 110)
)
)
(set_local $f
(f32.load
(i32.const 111)
)
)
(set_local $f
(f32.load
(i32.const 112)
)
)
(set_local $f
(f32.load align=1
(i32.const 113)
)
)
(set_local $f
(f32.load align=2
(i32.const 114)
)
)
(set_local $f
(f32.load
(i32.const 115)
)
)
(set_local $d
(f64.load
(i32.const 116)
)
)
(set_local $d
(f64.load
(i32.const 117)
)
)
(set_local $d
(f64.load align=1
(i32.const 118)
)
)
(set_local $d
(f64.load align=2
(i32.const 119)
)
)
(set_local $d
(f64.load align=4
(i32.const 120)
)
)
(set_local $d
(f64.load
(i32.const 121)
)
)
)
(func $stores
(local $i i32)
(local $f f32)
(local $d f64)
(i32.store8
(i32.const 100)
(get_local $i)
)
(i32.store8
(i32.const 101)
(get_local $i)
)
(i32.store16
(i32.const 102)
(get_local $i)
)
(i32.store16
(i32.const 103)
(get_local $i)
)
(i32.store16 align=1
(i32.const 104)
(get_local $i)
)
(i32.store16
(i32.const 105)
(get_local $i)
)
(i32.store
(i32.const 106)
(get_local $i)
)
(i32.store
(i32.const 107)
(get_local $i)
)
(i32.store align=1
(i32.const 108)
(get_local $i)
)
(i32.store align=2
(i32.const 109)
(get_local $i)
)
(i32.store
(i32.const 110)
(get_local $i)
)
(f32.store
(i32.const 111)
(get_local $f)
)
(f32.store
(i32.const 112)
(get_local $f)
)
(f32.store align=1
(i32.const 113)
(get_local $f)
)
(f32.store align=2
(i32.const 114)
(get_local $f)
)
(f32.store
(i32.const 115)
(get_local $f)
)
(f64.store
(i32.const 116)
(get_local $d)
)
(f64.store
(i32.const 117)
(get_local $d)
)
(f64.store align=1
(i32.const 118)
(get_local $d)
)
(f64.store align=2
(i32.const 119)
(get_local $d)
)
(f64.store align=4
(i32.const 120)
(get_local $d)
)
(f64.store
(i32.const 121)
(get_local $d)
)
)
(func $test
(local $i i32)
(local $j i64)
(local $f f32)
(local $f1 f32)
(local $f2 f32)
(local $d1 f64)
(local $d2 f64)
(set_local $i
(i32.reinterpret/f32
(get_local $f)
)
)
(set_local $f
(f32.reinterpret/i32
(get_local $i)
)
)
(set_local $i
(i32.ctz
(get_local $i)
)
)
(set_local $i
(i32.popcnt
(get_local $i)
)
)
(set_local $j
(i64.popcnt
(get_local $j)
)
)
(set_local $f1
(f32.copysign
(get_local $f1)
(get_local $f2)
)
)
(set_local $d1
(f64.copysign
(get_local $d1)
(get_local $d2)
)
)
)
(func $i64u-div (param $0 i64) (param $1 i64) (result i64)
(if i64
(i64.eqz
(get_local $1)
)
(i64.const 0)
(i64.div_u
(get_local $0)
(get_local $1)
)
)
)
(func $i64s-div (param $0 i64) (param $1 i64) (result i64)
(if i64
(i64.eqz
(get_local $1)
)
(i64.const 0)
(i64.div_s
(get_local $0)
(get_local $1)
)
)
)
(func $i64u-rem (param $0 i64) (param $1 i64) (result i64)
(if i64
(i64.eqz
(get_local $1)
)
(i64.const 0)
(i64.rem_u
(get_local $0)
(get_local $1)
)
)
)
(func $i64s-rem (param $0 i64) (param $1 i64) (result i64)
(if i64
(i64.eqz
(get_local $1)
)
(i64.const 0)
(i64.rem_s
(get_local $0)
(get_local $1)
)
)
)
(func $test64
(local $x i64)
(local $y i64)
(local $z i32)
(local $int32 i32)
(local $float32 f32)
(local $float64 f64)
(set_local $x
(i64.const 100)
)
(set_local $y
(i64.const 128849018897)
)
(set_local $x
(i64.add
(get_local $x)
(get_local $y)
)
)
(set_local $x
(i64.sub
(get_local $x)
(get_local $y)
)
)
(set_local $x
(i64.mul
(get_local $x)
(get_local $y)
)
)
(set_local $x
(call $i64u-div
(get_local $x)
(get_local $y)
)
)
(set_local $x
(call $i64s-div
(get_local $x)
(get_local $y)
)
)
(set_local $x
(call $i64u-rem
(get_local $x)
(get_local $y)
)
)
(set_local $x
(call $i64s-rem
(get_local $x)
(get_local $y)
)
)
(set_local $x
(i64.and
(get_local $x)
(get_local $y)
)
)
(set_local $x
(i64.or
(get_local $x)
(get_local $y)
)
)
(set_local $x
(i64.xor
(get_local $x)
(get_local $y)
)
)
(set_local $x
(i64.shl
(get_local $x)
(get_local $y)
)
)
(set_local $x
(i64.shr_s
(get_local $x)
(get_local $y)
)
)
(set_local $x
(i64.shr_u
(get_local $x)
(get_local $y)
)
)
(set_local $x
(i64.load
(i32.const 120)
)
)
(set_local $x
(i64.load
(i32.const 120)
)
)
(set_local $x
(i64.load align=2
(i32.const 120)
)
)
(set_local $x
(i64.load align=4
(i32.const 120)
)
)
(set_local $x
(i64.load
(i32.const 120)
)
)
(i64.store
(i32.const 120)
(get_local $x)
)
(i64.store
(i32.const 120)
(get_local $x)
)
(i64.store align=2
(i32.const 120)
(get_local $x)
)
(i64.store align=4
(i32.const 120)
(get_local $x)
)
(i64.store
(i32.const 120)
(get_local $x)
)
(set_local $z
(i64.eq
(get_local $x)
(get_local $y)
)
)
(set_local $z
(i64.ne
(get_local $x)
(get_local $y)
)
)
(set_local $z
(i64.le_u
(get_local $x)
(get_local $y)
)
)
(set_local $z
(i64.le_s
(get_local $x)
(get_local $y)
)
)
(set_local $z
(i64.ge_u
(get_local $x)
(get_local $y)
)
)
(set_local $z
(i64.ge_s
(get_local $x)
(get_local $y)
)
)
(set_local $z
(i64.lt_u
(get_local $x)
(get_local $y)
)
)
(set_local $z
(i64.lt_s
(get_local $x)
(get_local $y)
)
)
(set_local $z
(i64.gt_u
(get_local $x)
(get_local $y)
)
)
(set_local $z
(i64.gt_s
(get_local $x)
(get_local $y)
)
)
(set_local $int32
(i32.wrap/i64
(get_local $x)
)
)
(set_local $x
(i64.extend_s/i32
(get_local $int32)
)
)
(set_local $x
(i64.extend_u/i32
(get_local $int32)
)
)
(set_local $float32
(f32.convert_s/i64
(get_local $x)
)
)
(set_local $float64
(f64.convert_s/i64
(get_local $x)
)
)
(set_local $float32
(f32.convert_u/i64
(get_local $x)
)
)
(set_local $float64
(f64.convert_u/i64
(get_local $x)
)
)
(set_local $x
(i64.trunc_s/f32
(get_local $float32)
)
)
(set_local $x
(i64.trunc_s/f64
(get_local $float64)
)
)
(set_local $x
(i64.trunc_u/f32
(get_local $float32)
)
)
(set_local $x
(i64.trunc_u/f64
(get_local $float64)
)
)
(set_local $x
(i64.reinterpret/f64
(get_local $float64)
)
)
(set_local $float64
(f64.reinterpret/i64
(get_local $x)
)
)
(set_local $x
(i64.clz
(get_local $y)
)
)
(set_local $y
(i64.ctz
(get_local $x)
)
)
)
(func $imports (result i64)
(call $legalfunc$illegalImport
(f64.const -3.13159)
(i64.const 94489280523)
(i32.const -33)
)
(return
(call $legalfunc$illegalImportResult)
)
)
(func $arg (param $x i64)
(i64.store
(i32.const 100)
(get_local $x)
)
(call $arg
(get_local $x)
)
)
(func $illegalParam (param $a i32) (param $x i64) (param $b f64)
(i64.store
(i32.const 100)
(get_local $x)
)
(call $illegalParam
(i32.const 0)
(get_local $x)
(f64.const 12.34)
)
)
(func $result (result i64)
(return
(i64.const 8589934593)
)
)
(func $illegalResult (result i64)
(return
(i64.const 8589934593)
)
)
(func $call1 (param $x i64) (result i64)
(local $y i64)
(set_local $y
(call $call1
(get_local $x)
)
)
(return
(get_local $y)
)
)
(func $call2 (param $x i64) (result i64)
(drop
(call $call2
(call $call2
(get_local $x)
)
)
)
(return
(i64.const 245127260211081)
)
)
(func $returnCastConst (result i64)
(return
(i64.const 0)
)
)
(func $ifValue64 (param $$4 i64) (param $$6 i64) (result i64)
(local $$$0 i64)
(local $$9 i64)
(local $$10 i64)
(if
(get_local $$6)
(block
(set_local $$9
(call $call2
(get_local $$4)
)
)
(set_local $$$0
(get_local $$9)
)
)
(block
(set_local $$10
(call $call2
(get_local $$4)
)
)
(set_local $$$0
(get_local $$10)
)
)
)
(return
(get_local $$$0)
)
)
(func $ifValue32 (param $$4 i32) (param $$6 i32) (result i32)
(local $$$0 i32)
(local $$9 i32)
(local $$10 i32)
(if
(get_local $$6)
(block
(set_local $$9
(call $ifValue32
(get_local $$4)
(get_local $$6)
)
)
(set_local $$$0
(get_local $$9)
)
)
(block
(set_local $$10
(call $ifValue32
(get_local $$4)
(get_local $$6)
)
)
(set_local $$$0
(get_local $$10)
)
)
)
(return
(get_local $$$0)
)
)
(func $switch64 (param $$a444 i64) (result i32)
(local $$waka i32)
(block $switch$0
(block $switch-default$3
(block $switch-default$3
(block $switch-case$2
(block $switch-case$1
(br_table $switch-case$2 $switch-default$3 $switch-case$1 $switch-default$3
(i32.wrap/i64
(i64.sub
(get_local $$a444)
(i64.const 42949672965)
)
)
)
)
(block
(set_local $$waka
(i32.const 11000)
)
(br $switch$0)
)
)
(block
(set_local $$waka
(i32.const 10)
)
(br $switch$0)
)
)
(set_local $$waka
(i32.const 1)
)
)
)
(return
(get_local $$waka)
)
)
(func $legalstub$illegalParam (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64)
(call $illegalParam
(get_local $0)
(i64.or
(i64.extend_u/i32
(get_local $1)
)
(i64.shl
(i64.extend_u/i32
(get_local $2)
)
(i64.const 32)
)
)
(get_local $3)
)
)
(func $legalstub$illegalResult (result i32)
(local $0 i64)
(set_local $0
(call $illegalResult)
)
(unreachable)
(i32.wrap/i64
(get_local $0)
)
)
(func $legalfunc$illegalImport (param $0 f64) (param $1 i64) (param $2 i32)
(call $legalimport$illegalImport
(get_local $0)
(i32.wrap/i64
(get_local $1)
)
(i32.wrap/i64
(i64.shr_u
(get_local $1)
(i64.const 32)
)
)
(get_local $2)
)
)
(func $legalfunc$illegalImportResult (result i64)
(i64.or
(i64.extend_u/i32
(call $legalimport$illegalImportResult)
)
(i64.shl
(i64.extend_u/i32
(unreachable)
)
(i64.const 32)
)
)
)
)