blob: 5cbbd6bb59c352889081e531e05a6c5f6e6d143a [file] [log] [blame] [edit]
(module
(type $none_=>_none (func))
(type $none_=>_i32 (func (result i32)))
(type $i64_=>_i64 (func (param i64) (result i64)))
(type $i32_=>_none (func (param i32)))
(type $i32_i32_i32_f64_=>_none (func (param i32 i32 i32 f64)))
(type $i32_i64_f64_=>_none (func (param i32 i64 f64)))
(type $i64_=>_none (func (param i64)))
(type $f64_i32_i32_i32_=>_none (func (param f64 i32 i32 i32)))
(type $f64_i64_i32_=>_none (func (param f64 i64 i32)))
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(type $none_=>_i64 (func (result i64)))
(type $f32_=>_f32 (func (param f32) (result f32)))
(import "env" "memory" (memory $memory 256 256))
(import "env" "table" (table $table 3 3 funcref))
(elem (global.get $__table_base) $legalfunc$illegalImport $_fabsf $legalfunc$do_i64)
(import "env" "__table_base" (global $__table_base i32))
(import "env" "_fabsf" (func $_fabsf (param f32) (result f32)))
(import "env" "setTempRet0" (func $setTempRet0 (param i32)))
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
(import "env" "getTempRet0" (func $getTempRet0 (result i32)))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "do_i64" (func $legalimport$do_i64 (result i32)))
(export "test64" (func $test64))
(export "illegalParam" (func $legalstub$illegalParam))
(export "illegalResult" (func $legalstub$illegalResult))
(export "keepAlive" (func $keepAlive))
(func $stores (; has Stack IR ;)
(i32.store8
(i32.const 100)
(i32.const 0)
)
(i32.store8
(i32.const 101)
(i32.const 0)
)
(i32.store16
(i32.const 102)
(i32.const 0)
)
(i32.store16
(i32.const 103)
(i32.const 0)
)
(i32.store16 align=1
(i32.const 104)
(i32.const 0)
)
(i32.store16
(i32.const 105)
(i32.const 0)
)
(i32.store
(i32.const 106)
(i32.const 0)
)
(i32.store
(i32.const 107)
(i32.const 0)
)
(i32.store align=1
(i32.const 108)
(i32.const 0)
)
(i32.store align=2
(i32.const 109)
(i32.const 0)
)
(i32.store
(i32.const 110)
(i32.const 0)
)
(f32.store
(i32.const 111)
(f32.const 0)
)
(f32.store
(i32.const 112)
(f32.const 0)
)
(f32.store align=1
(i32.const 113)
(f32.const 0)
)
(f32.store align=2
(i32.const 114)
(f32.const 0)
)
(f32.store
(i32.const 115)
(f32.const 0)
)
(f64.store
(i32.const 116)
(f64.const 0)
)
(f64.store
(i32.const 117)
(f64.const 0)
)
(f64.store align=1
(i32.const 118)
(f64.const 0)
)
(f64.store align=2
(i32.const 119)
(f64.const 0)
)
(f64.store align=4
(i32.const 120)
(f64.const 0)
)
(f64.store
(i32.const 121)
(f64.const 0)
)
)
(func $test64 (; has Stack IR ;)
(local $0 i64)
(i64.store
(i32.const 120)
(local.tee $0
(i64.load
(i32.const 120)
)
)
)
(i64.store
(i32.const 120)
(local.get $0)
)
(i64.store align=2
(i32.const 120)
(local.get $0)
)
(i64.store align=4
(i32.const 120)
(local.get $0)
)
(i64.store
(i32.const 120)
(local.get $0)
)
)
(func $imports (; has Stack IR ;)
(call $legalfunc$illegalImport
(f64.const -3.13159)
(i64.const 94489280523)
(i32.const -33)
)
(drop
(i64.or
(i64.extend_i32_u
(call $legalimport$illegalImportResult)
)
(i64.shl
(i64.extend_i32_u
(call $getTempRet0)
)
(i64.const 32)
)
)
)
)
(func $arg (; has Stack IR ;) (param $0 i64)
(i64.store
(i32.const 100)
(local.get $0)
)
(call $arg
(local.get $0)
)
)
(func $illegalParam (; has Stack IR ;) (param $0 i32) (param $1 i64) (param $2 f64)
(i32.store
(i32.const 50)
(local.get $0)
)
(i64.store
(i32.const 100)
(local.get $1)
)
(f64.store
(i32.const 200)
(local.get $2)
)
(call $illegalParam
(i32.const 0)
(local.get $1)
(f64.const 12.34)
)
)
(func $call1 (; has Stack IR ;) (param $0 i64) (result i64)
(call $call1
(local.get $0)
)
)
(func $call2 (; has Stack IR ;) (param $0 i64) (result i64)
(drop
(call $call2
(call $call2
(local.get $0)
)
)
)
(i64.const 245127260211081)
)
(func $ifValue64 (; has Stack IR ;)
(drop
(call $call2
(i64.const 0)
)
)
)
(func $ifValue32 (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
(call $ifValue32
(local.get $0)
(local.get $1)
)
)
(func $unreachable_leftovers (; has Stack IR ;)
(i32.store
(i32.const 0)
(i32.const -2)
)
)
(func $keepAlive (; has Stack IR ;)
(call $stores)
(call $stores)
(call $imports)
(call $imports)
(call $arg
(i64.const 0)
)
(call $arg
(i64.const 0)
)
(drop
(call $call1
(i64.const 0)
)
)
(drop
(call $call1
(i64.const 0)
)
)
(drop
(call $call2
(i64.const 0)
)
)
(drop
(call $call2
(i64.const 0)
)
)
(call $ifValue64)
(call $ifValue64)
(drop
(call $ifValue32
(i32.const 0)
(i32.const 0)
)
)
(drop
(call $ifValue32
(i32.const 0)
(i32.const 0)
)
)
(call $unreachable_leftovers)
(call $unreachable_leftovers)
)
(func $legalstub$illegalParam (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64)
(call $illegalParam
(local.get $0)
(i64.or
(i64.extend_i32_u
(local.get $1)
)
(i64.shl
(i64.extend_i32_u
(local.get $2)
)
(i64.const 32)
)
)
(local.get $3)
)
)
(func $legalstub$illegalResult (; has Stack IR ;) (result i32)
(call $setTempRet0
(i32.const 2)
)
(i32.const 1)
)
(func $legalfunc$illegalImport (; has Stack IR ;) (param $0 f64) (param $1 i64) (param $2 i32)
(call $legalimport$illegalImport
(local.get $0)
(i32.wrap_i64
(local.get $1)
)
(i32.wrap_i64
(i64.shr_u
(local.get $1)
(i64.const 32)
)
)
(local.get $2)
)
)
(func $legalfunc$do_i64 (; has Stack IR ;) (result i64)
(i64.or
(i64.extend_i32_u
(call $legalimport$do_i64)
)
(i64.shl
(i64.extend_i32_u
(call $getTempRet0)
)
(i64.const 32)
)
)
)
)