diff options
Diffstat (limited to 'test/i64.fromasm.imprecise')
-rw-r--r-- | test/i64.fromasm.imprecise | 214 |
1 files changed, 214 insertions, 0 deletions
diff --git a/test/i64.fromasm.imprecise b/test/i64.fromasm.imprecise new file mode 100644 index 000000000..742d4cf31 --- /dev/null +++ b/test/i64.fromasm.imprecise @@ -0,0 +1,214 @@ +(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 "test" (func $test)) + (export "illegalParam" (func $legalstub$illegalParam)) + (export "illegalResult" (func $legalstub$result)) + (func $test + (local $0 i64) + (local $1 i32) + (local $2 i64) + (local $3 f64) + (set_local $2 + (i64.const 128849018897) + ) + (i64.store + (i32.const 120) + (tee_local $0 + (i64.load + (i32.const 120) + ) + ) + ) + (i64.store align=2 + (i32.const 120) + (get_local $0) + ) + (i64.store align=4 + (i32.const 120) + (get_local $0) + ) + (i64.store + (i32.const 120) + (get_local $0) + ) + (set_local $1 + (i32.wrap/i64 + (get_local $0) + ) + ) + (set_local $0 + (i64.extend_u/i32 + (get_local $1) + ) + ) + (set_local $3 + (f64.convert_u/i64 + (get_local $0) + ) + ) + ) + (func $imports (result i64) + (call $legalfunc$illegalImport + (f64.const -3.13159) + (i64.const 94489280523) + (i32.const -33) + ) + (call $legalfunc$illegalImportResult) + ) + (func $arg (param $0 i64) + (i64.store + (i32.const 100) + (get_local $0) + ) + (call $arg + (get_local $0) + ) + ) + (func $illegalParam (param $0 i32) (param $1 i64) (param $2 f64) + (i64.store + (i32.const 100) + (get_local $1) + ) + (call $illegalParam + (i32.const 0) + (get_local $1) + (f64.const 12.34) + ) + ) + (func $result (result i64) + (i64.const 8589934593) + ) + (func $call1 (param $0 i64) (result i64) + (call $call1 + (get_local $0) + ) + ) + (func $call2 (param $0 i64) (result i64) + (drop + (call $call2 + (call $call2 + (get_local $0) + ) + ) + ) + (i64.const 245127260211081) + ) + (func $returnCastConst (result i64) + (i64.const 0) + ) + (func $ifValue64 (param $0 i64) (param $1 i64) (result i64) + (if i64 + (get_local $1) + (call $call2 + (get_local $0) + ) + (call $call2 + (get_local $0) + ) + ) + ) + (func $ifValue32 (param $0 i32) (param $1 i32) (result i32) + (if i32 + (get_local $1) + (call $ifValue32 + (get_local $0) + (get_local $1) + ) + (call $ifValue32 + (get_local $0) + (get_local $1) + ) + ) + ) + (func $switch64 (param $0 i64) (result i32) + (block $switch$0 i32 + (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 $0) + (i64.const 42949672965) + ) + ) + ) + ) + (br $switch$0 + (i32.const 11000) + ) + ) + (br $switch$0 + (i32.const 10) + ) + ) + (i32.const 1) + ) + ) + (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$result (result i32) + (local $0 i64) + (set_local $0 + (call $result) + ) + (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) + ) + ) + ) +) |