summaryrefslogtreecommitdiff
path: root/test/wasm-only.fromasm
diff options
context:
space:
mode:
Diffstat (limited to 'test/wasm-only.fromasm')
-rw-r--r--test/wasm-only.fromasm324
1 files changed, 98 insertions, 226 deletions
diff --git a/test/wasm-only.fromasm b/test/wasm-only.fromasm
index f3e2c2817..36611ca94 100644
--- a/test/wasm-only.fromasm
+++ b/test/wasm-only.fromasm
@@ -249,105 +249,113 @@
)
)
)
- (func $f32-to-int64 (; 9 ;) (; has Stack IR ;) (param $0 f32) (result i64)
- (if (result i64)
- (f32.ne
- (local.get $0)
- (local.get $0)
- )
- (i64.const -9223372036854775808)
+ (func $f32-to-int64 (; 9 ;) (; has Stack IR ;) (param $0 f32)
+ (drop
(if (result i64)
- (f32.ge
+ (f32.ne
+ (local.get $0)
(local.get $0)
- (f32.const 9223372036854775808)
)
(i64.const -9223372036854775808)
(if (result i64)
- (f32.le
+ (f32.ge
(local.get $0)
- (f32.const -9223372036854775808)
+ (f32.const 9223372036854775808)
)
(i64.const -9223372036854775808)
- (i64.trunc_f32_s
- (local.get $0)
+ (if (result i64)
+ (f32.le
+ (local.get $0)
+ (f32.const -9223372036854775808)
+ )
+ (i64.const -9223372036854775808)
+ (i64.trunc_f32_s
+ (local.get $0)
+ )
)
)
)
)
)
- (func $f64-to-int64 (; 10 ;) (; has Stack IR ;) (param $0 f64) (result i64)
- (if (result i64)
- (f64.ne
- (local.get $0)
- (local.get $0)
- )
- (i64.const -9223372036854775808)
+ (func $f64-to-int64 (; 10 ;) (; has Stack IR ;) (param $0 f64)
+ (drop
(if (result i64)
- (f64.ge
+ (f64.ne
+ (local.get $0)
(local.get $0)
- (f64.const 9223372036854775808)
)
(i64.const -9223372036854775808)
(if (result i64)
- (f64.le
+ (f64.ge
(local.get $0)
- (f64.const -9223372036854775808)
+ (f64.const 9223372036854775808)
)
(i64.const -9223372036854775808)
- (i64.trunc_f64_s
- (local.get $0)
+ (if (result i64)
+ (f64.le
+ (local.get $0)
+ (f64.const -9223372036854775808)
+ )
+ (i64.const -9223372036854775808)
+ (i64.trunc_f64_s
+ (local.get $0)
+ )
)
)
)
)
)
- (func $f32-to-uint64 (; 11 ;) (; has Stack IR ;) (param $0 f32) (result i64)
- (if (result i64)
- (f32.ne
- (local.get $0)
- (local.get $0)
- )
- (i64.const 0)
+ (func $f32-to-uint64 (; 11 ;) (; has Stack IR ;) (param $0 f32)
+ (drop
(if (result i64)
- (f32.ge
+ (f32.ne
+ (local.get $0)
(local.get $0)
- (f32.const 18446744073709551615)
)
(i64.const 0)
(if (result i64)
- (f32.le
+ (f32.ge
(local.get $0)
- (f32.const -1)
+ (f32.const 18446744073709551615)
)
(i64.const 0)
- (i64.trunc_f32_u
- (local.get $0)
+ (if (result i64)
+ (f32.le
+ (local.get $0)
+ (f32.const -1)
+ )
+ (i64.const 0)
+ (i64.trunc_f32_u
+ (local.get $0)
+ )
)
)
)
)
)
- (func $f64-to-uint64 (; 12 ;) (; has Stack IR ;) (param $0 f64) (result i64)
- (if (result i64)
- (f64.ne
- (local.get $0)
- (local.get $0)
- )
- (i64.const 0)
+ (func $f64-to-uint64 (; 12 ;) (; has Stack IR ;) (param $0 f64)
+ (drop
(if (result i64)
- (f64.ge
+ (f64.ne
+ (local.get $0)
(local.get $0)
- (f64.const 18446744073709551615)
)
(i64.const 0)
(if (result i64)
- (f64.le
+ (f64.ge
(local.get $0)
- (f64.const -1)
+ (f64.const 18446744073709551615)
)
(i64.const 0)
- (i64.trunc_f64_u
- (local.get $0)
+ (if (result i64)
+ (f64.le
+ (local.get $0)
+ (f64.const -1)
+ )
+ (i64.const 0)
+ (i64.trunc_f64_u
+ (local.get $0)
+ )
)
)
)
@@ -413,56 +421,50 @@
(i32.const 120)
(local.get $0)
)
- (drop
- (call $f32-to-int64
- (local.tee $1
- (f32.convert_i64_u
- (local.tee $0
- (i64.extend_i32_u
- (i32.wrap_i64
- (local.get $0)
- )
+ (call $f32-to-int64
+ (local.tee $1
+ (f32.convert_i64_u
+ (local.tee $0
+ (i64.extend_i32_u
+ (i32.wrap_i64
+ (local.get $0)
)
)
)
)
)
)
- (drop
- (call $f64-to-int64
- (local.tee $2
- (f64.convert_i64_u
- (local.get $0)
- )
+ (call $f64-to-int64
+ (local.tee $2
+ (f64.convert_i64_u
+ (local.get $0)
)
)
)
- (drop
- (call $f32-to-uint64
- (local.get $1)
- )
+ (call $f32-to-uint64
+ (local.get $1)
)
- (drop
- (call $f64-to-uint64
- (local.get $2)
- )
+ (call $f64-to-uint64
+ (local.get $2)
)
)
- (func $imports (; 14 ;) (; has Stack IR ;) (result i64)
+ (func $imports (; 14 ;) (; has Stack IR ;)
(call $legalfunc$illegalImport
(f64.const -3.13159)
(i64.const 94489280523)
(i32.const -33)
)
- (i64.or
- (i64.extend_i32_u
- (call $legalimport$illegalImportResult)
- )
- (i64.shl
+ (drop
+ (i64.or
(i64.extend_i32_u
- (call $getTempRet0)
+ (call $legalimport$illegalImportResult)
+ )
+ (i64.shl
+ (i64.extend_i32_u
+ (call $getTempRet0)
+ )
+ (i64.const 32)
)
- (i64.const 32)
)
)
)
@@ -509,151 +511,32 @@
)
(i64.const 245127260211081)
)
- (func $ifValue32 (; 19 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
+ (func $ifValue64 (; 19 ;) (; has Stack IR ;)
+ (drop
+ (call $call2
+ (i64.const 0)
+ )
+ )
+ )
+ (func $ifValue32 (; 20 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
(call $ifValue32
(local.get $0)
(local.get $1)
)
)
- (func $unreachable_leftovers (; 20 ;) (; has Stack IR ;)
+ (func $unreachable_leftovers (; 21 ;) (; has Stack IR ;)
(i32.store
(i32.const 0)
(i32.const -2)
)
)
- (func $_memchr (; 21 ;) (; has Stack IR ;) (result i32)
- (local $0 i32)
- (local $1 i32)
- (local $2 i32)
- (block $label$break$L8
- (block $__rjti$2
- (br_if $__rjti$2
- (local.get $0)
- )
- (local.set $0
- (i32.const 0)
- )
- (br $label$break$L8)
- )
- (local.set $0
- (local.get $2)
- )
- (if
- (i32.load8_u
- (local.get $1)
- )
- (block
- (block $__rjto$0
- (block $__rjti$0
- (br_if $__rjti$0
- (i32.le_u
- (local.get $0)
- (i32.const 3)
- )
- )
- (loop $while-in3
- (if
- (i32.eqz
- (i32.and
- (i32.xor
- (i32.and
- (local.tee $2
- (i32.load
- (local.get $1)
- )
- )
- (i32.const -2139062144)
- )
- (i32.const -2139062144)
- )
- (i32.add
- (local.get $2)
- (i32.const -16843009)
- )
- )
- )
- (block
- (local.set $1
- (i32.add
- (local.get $1)
- (i32.const 4)
- )
- )
- (br_if $while-in3
- (i32.gt_u
- (local.tee $0
- (i32.add
- (local.get $0)
- (i32.const -4)
- )
- )
- (i32.const 3)
- )
- )
- (br $__rjti$0)
- )
- )
- )
- (br $__rjto$0)
- )
- (if
- (i32.eqz
- (local.get $0)
- )
- (block
- (local.set $0
- (i32.const 0)
- )
- (br $label$break$L8)
- )
- )
- )
- (local.set $0
- (loop $while-in5 (result i32)
- (br_if $label$break$L8
- (i32.eqz
- (i32.load8_u
- (local.get $1)
- )
- )
- )
- (local.set $1
- (i32.add
- (local.get $1)
- (i32.const 1)
- )
- )
- (br_if $while-in5
- (local.tee $0
- (i32.add
- (local.get $0)
- (i32.const -1)
- )
- )
- )
- (i32.const 0)
- )
- )
- )
- )
- )
- (select
- (local.get $1)
- (i32.const 0)
- (local.get $0)
- )
- )
(func $keepAlive (; 22 ;) (; has Stack IR ;)
(call $loads)
(call $loads)
(call $stores)
(call $stores)
- (drop
- (call $imports)
- )
- (drop
- (call $imports)
- )
+ (call $imports)
+ (call $imports)
(call $arg
(i64.const 0)
)
@@ -680,16 +563,8 @@
(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)
@@ -704,9 +579,6 @@
)
(call $unreachable_leftovers)
(call $unreachable_leftovers)
- (drop
- (call $_memchr)
- )
)
(func $legalstub$illegalParam (; 23 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64)
(call $illegalParam