diff options
Diffstat (limited to 'test/i64.fromasm.no-opts')
-rw-r--r-- | test/i64.fromasm.no-opts | 554 |
1 files changed, 554 insertions, 0 deletions
diff --git a/test/i64.fromasm.no-opts b/test/i64.fromasm.no-opts new file mode 100644 index 000000000..85d7018e3 --- /dev/null +++ b/test/i64.fromasm.no-opts @@ -0,0 +1,554 @@ +(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$illegalResult)) + (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 $test + (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 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 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) + ) + ) + ) +) |