summaryrefslogtreecommitdiff
path: root/test/wasm-only.fromasm.imprecise.no-opts
diff options
context:
space:
mode:
Diffstat (limited to 'test/wasm-only.fromasm.imprecise.no-opts')
-rw-r--r--test/wasm-only.fromasm.imprecise.no-opts592
1 files changed, 592 insertions, 0 deletions
diff --git a/test/wasm-only.fromasm.imprecise.no-opts b/test/wasm-only.fromasm.imprecise.no-opts
index 2ab7a85ca..5bdb5bc00 100644
--- a/test/wasm-only.fromasm.imprecise.no-opts
+++ b/test/wasm-only.fromasm.imprecise.no-opts
@@ -6,6 +6,7 @@
(type $legaltype$illegalImportResult (func (result i32)))
(type $legaltype$_fabsf (func (param f64) (result f64)))
(type $legaltype$do_i64 (func (result i32)))
+ (import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "illegalImport" (func $illegalImport (param f64 i64 i32)))
(import "env" "illegalImportResult" (func $illegalImportResult (result i64)))
(import "env" "_fabsf" (func $_fabsf (param f32) (result f32)))
@@ -18,6 +19,7 @@
(import "env" "table" (table 3 3 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
(global $tempRet0 (mut i32) (i32.const 0))
(elem (get_global $tableBase) $legalfunc$illegalImport $legalfunc$_fabsf $legalfunc$do_i64)
(export "test64" (func $test64))
@@ -889,6 +891,584 @@
(i32.const 44)
)
)
+ (func $_memchr (param $$src i32) (param $$c i32) (param $$n i32) (result i32)
+ (local $$0 i32)
+ (local $$1 i32)
+ (local $$2 i32)
+ (local $$3 i32)
+ (local $$4 i32)
+ (local $$5 i32)
+ (local $$6 i32)
+ (local $$7 i32)
+ (local $$and i32)
+ (local $$and15 i32)
+ (local $$and16 i32)
+ (local $$and39 i32)
+ (local $$cmp i32)
+ (local $$cmp11 i32)
+ (local $$cmp1132 i32)
+ (local $$cmp28 i32)
+ (local $$cmp8 i32)
+ (local $$cond i32)
+ (local $$conv1 i32)
+ (local $$dec i32)
+ (local $$dec34 i32)
+ (local $$incdec$ptr i32)
+ (local $$incdec$ptr21 i32)
+ (local $$incdec$ptr33 i32)
+ (local $$lnot i32)
+ (local $$mul i32)
+ (local $$n$addr$0$lcssa i32)
+ (local $$n$addr$0$lcssa52 i32)
+ (local $$n$addr$043 i32)
+ (local $$n$addr$1$lcssa i32)
+ (local $$n$addr$133 i32)
+ (local $$n$addr$227 i32)
+ (local $$n$addr$3 i32)
+ (local $$neg i32)
+ (local $$or$cond i32)
+ (local $$or$cond42 i32)
+ (local $$s$0$lcssa i32)
+ (local $$s$0$lcssa53 i32)
+ (local $$s$044 i32)
+ (local $$s$128 i32)
+ (local $$s$2 i32)
+ (local $$sub i32)
+ (local $$sub22 i32)
+ (local $$tobool i32)
+ (local $$tobool2 i32)
+ (local $$tobool2$lcssa i32)
+ (local $$tobool241 i32)
+ (local $$tobool25 i32)
+ (local $$tobool2526 i32)
+ (local $$tobool36 i32)
+ (local $$tobool40 i32)
+ (local $$w$0$lcssa i32)
+ (local $$w$034 i32)
+ (local $$xor i32)
+ (local $label i32)
+ (local $sp i32)
+ (set_local $sp
+ (get_global $STACKTOP)
+ )
+ (set_local $$conv1
+ (i32.and
+ (get_local $$c)
+ (i32.const 255)
+ )
+ )
+ (set_local $$0
+ (get_local $$src)
+ )
+ (set_local $$and39
+ (i32.and
+ (get_local $$0)
+ (i32.const 3)
+ )
+ )
+ (set_local $$tobool40
+ (i32.ne
+ (get_local $$and39)
+ (i32.const 0)
+ )
+ )
+ (set_local $$tobool241
+ (i32.ne
+ (get_local $$n)
+ (i32.const 0)
+ )
+ )
+ (set_local $$or$cond42
+ (i32.and
+ (get_local $$tobool241)
+ (get_local $$tobool40)
+ )
+ )
+ (block $label$break$L1
+ (if
+ (get_local $$or$cond42)
+ (block
+ (set_local $$1
+ (i32.and
+ (get_local $$c)
+ (i32.const 255)
+ )
+ )
+ (set_local $$n$addr$043
+ (get_local $$n)
+ )
+ (set_local $$s$044
+ (get_local $$src)
+ )
+ (loop $while-in
+ (block $while-out
+ (set_local $$2
+ (i32.load8_s
+ (get_local $$s$044)
+ )
+ )
+ (set_local $$cmp
+ (i32.eq
+ (i32.shr_s
+ (i32.shl
+ (get_local $$2)
+ (i32.const 24)
+ )
+ (i32.const 24)
+ )
+ (i32.shr_s
+ (i32.shl
+ (get_local $$1)
+ (i32.const 24)
+ )
+ (i32.const 24)
+ )
+ )
+ )
+ (if
+ (get_local $$cmp)
+ (block
+ (set_local $$n$addr$0$lcssa52
+ (get_local $$n$addr$043)
+ )
+ (set_local $$s$0$lcssa53
+ (get_local $$s$044)
+ )
+ (set_local $label
+ (i32.const 6)
+ )
+ (br $label$break$L1)
+ )
+ )
+ (set_local $$incdec$ptr
+ (i32.add
+ (get_local $$s$044)
+ (i32.const 1)
+ )
+ )
+ (set_local $$dec
+ (i32.add
+ (get_local $$n$addr$043)
+ (i32.const -1)
+ )
+ )
+ (set_local $$3
+ (get_local $$incdec$ptr)
+ )
+ (set_local $$and
+ (i32.and
+ (get_local $$3)
+ (i32.const 3)
+ )
+ )
+ (set_local $$tobool
+ (i32.ne
+ (get_local $$and)
+ (i32.const 0)
+ )
+ )
+ (set_local $$tobool2
+ (i32.ne
+ (get_local $$dec)
+ (i32.const 0)
+ )
+ )
+ (set_local $$or$cond
+ (i32.and
+ (get_local $$tobool2)
+ (get_local $$tobool)
+ )
+ )
+ (if
+ (get_local $$or$cond)
+ (block
+ (set_local $$n$addr$043
+ (get_local $$dec)
+ )
+ (set_local $$s$044
+ (get_local $$incdec$ptr)
+ )
+ )
+ (block
+ (set_local $$n$addr$0$lcssa
+ (get_local $$dec)
+ )
+ (set_local $$s$0$lcssa
+ (get_local $$incdec$ptr)
+ )
+ (set_local $$tobool2$lcssa
+ (get_local $$tobool2)
+ )
+ (set_local $label
+ (i32.const 5)
+ )
+ (br $while-out)
+ )
+ )
+ (br $while-in)
+ )
+ )
+ )
+ (block
+ (set_local $$n$addr$0$lcssa
+ (get_local $$n)
+ )
+ (set_local $$s$0$lcssa
+ (get_local $$src)
+ )
+ (set_local $$tobool2$lcssa
+ (get_local $$tobool241)
+ )
+ (set_local $label
+ (i32.const 5)
+ )
+ )
+ )
+ )
+ (if
+ (i32.eq
+ (get_local $label)
+ (i32.const 5)
+ )
+ (if
+ (get_local $$tobool2$lcssa)
+ (block
+ (set_local $$n$addr$0$lcssa52
+ (get_local $$n$addr$0$lcssa)
+ )
+ (set_local $$s$0$lcssa53
+ (get_local $$s$0$lcssa)
+ )
+ (set_local $label
+ (i32.const 6)
+ )
+ )
+ (block
+ (set_local $$n$addr$3
+ (i32.const 0)
+ )
+ (set_local $$s$2
+ (get_local $$s$0$lcssa)
+ )
+ )
+ )
+ )
+ (block $label$break$L8
+ (if
+ (i32.eq
+ (get_local $label)
+ (i32.const 6)
+ )
+ (block
+ (set_local $$4
+ (i32.load8_s
+ (get_local $$s$0$lcssa53)
+ )
+ )
+ (set_local $$5
+ (i32.and
+ (get_local $$c)
+ (i32.const 255)
+ )
+ )
+ (set_local $$cmp8
+ (i32.eq
+ (i32.shr_s
+ (i32.shl
+ (get_local $$4)
+ (i32.const 24)
+ )
+ (i32.const 24)
+ )
+ (i32.shr_s
+ (i32.shl
+ (get_local $$5)
+ (i32.const 24)
+ )
+ (i32.const 24)
+ )
+ )
+ )
+ (if
+ (get_local $$cmp8)
+ (block
+ (set_local $$n$addr$3
+ (get_local $$n$addr$0$lcssa52)
+ )
+ (set_local $$s$2
+ (get_local $$s$0$lcssa53)
+ )
+ )
+ (block
+ (set_local $$mul
+ (i32.mul
+ (get_local $$conv1)
+ (i32.const 16843009)
+ )
+ )
+ (set_local $$cmp1132
+ (i32.gt_u
+ (get_local $$n$addr$0$lcssa52)
+ (i32.const 3)
+ )
+ )
+ (block $label$break$L11
+ (if
+ (get_local $$cmp1132)
+ (block
+ (set_local $$n$addr$133
+ (get_local $$n$addr$0$lcssa52)
+ )
+ (set_local $$w$034
+ (get_local $$s$0$lcssa53)
+ )
+ (loop $while-in3
+ (block $while-out2
+ (set_local $$6
+ (i32.load
+ (get_local $$w$034)
+ )
+ )
+ (set_local $$xor
+ (i32.xor
+ (get_local $$6)
+ (get_local $$mul)
+ )
+ )
+ (set_local $$sub
+ (i32.add
+ (get_local $$xor)
+ (i32.const -16843009)
+ )
+ )
+ (set_local $$neg
+ (i32.and
+ (get_local $$xor)
+ (i32.const -2139062144)
+ )
+ )
+ (set_local $$and15
+ (i32.xor
+ (get_local $$neg)
+ (i32.const -2139062144)
+ )
+ )
+ (set_local $$and16
+ (i32.and
+ (get_local $$and15)
+ (get_local $$sub)
+ )
+ )
+ (set_local $$lnot
+ (i32.eq
+ (get_local $$and16)
+ (i32.const 0)
+ )
+ )
+ (if
+ (i32.eqz
+ (get_local $$lnot)
+ )
+ (br $while-out2)
+ )
+ (set_local $$incdec$ptr21
+ (i32.add
+ (get_local $$w$034)
+ (i32.const 4)
+ )
+ )
+ (set_local $$sub22
+ (i32.add
+ (get_local $$n$addr$133)
+ (i32.const -4)
+ )
+ )
+ (set_local $$cmp11
+ (i32.gt_u
+ (get_local $$sub22)
+ (i32.const 3)
+ )
+ )
+ (if
+ (get_local $$cmp11)
+ (block
+ (set_local $$n$addr$133
+ (get_local $$sub22)
+ )
+ (set_local $$w$034
+ (get_local $$incdec$ptr21)
+ )
+ )
+ (block
+ (set_local $$n$addr$1$lcssa
+ (get_local $$sub22)
+ )
+ (set_local $$w$0$lcssa
+ (get_local $$incdec$ptr21)
+ )
+ (set_local $label
+ (i32.const 11)
+ )
+ (br $label$break$L11)
+ )
+ )
+ (br $while-in3)
+ )
+ )
+ (set_local $$n$addr$227
+ (get_local $$n$addr$133)
+ )
+ (set_local $$s$128
+ (get_local $$w$034)
+ )
+ )
+ (block
+ (set_local $$n$addr$1$lcssa
+ (get_local $$n$addr$0$lcssa52)
+ )
+ (set_local $$w$0$lcssa
+ (get_local $$s$0$lcssa53)
+ )
+ (set_local $label
+ (i32.const 11)
+ )
+ )
+ )
+ )
+ (if
+ (i32.eq
+ (get_local $label)
+ (i32.const 11)
+ )
+ (block
+ (set_local $$tobool2526
+ (i32.eq
+ (get_local $$n$addr$1$lcssa)
+ (i32.const 0)
+ )
+ )
+ (if
+ (get_local $$tobool2526)
+ (block
+ (set_local $$n$addr$3
+ (i32.const 0)
+ )
+ (set_local $$s$2
+ (get_local $$w$0$lcssa)
+ )
+ (br $label$break$L8)
+ )
+ (block
+ (set_local $$n$addr$227
+ (get_local $$n$addr$1$lcssa)
+ )
+ (set_local $$s$128
+ (get_local $$w$0$lcssa)
+ )
+ )
+ )
+ )
+ )
+ (loop $while-in5
+ (block $while-out4
+ (set_local $$7
+ (i32.load8_s
+ (get_local $$s$128)
+ )
+ )
+ (set_local $$cmp28
+ (i32.eq
+ (i32.shr_s
+ (i32.shl
+ (get_local $$7)
+ (i32.const 24)
+ )
+ (i32.const 24)
+ )
+ (i32.shr_s
+ (i32.shl
+ (get_local $$5)
+ (i32.const 24)
+ )
+ (i32.const 24)
+ )
+ )
+ )
+ (if
+ (get_local $$cmp28)
+ (block
+ (set_local $$n$addr$3
+ (get_local $$n$addr$227)
+ )
+ (set_local $$s$2
+ (get_local $$s$128)
+ )
+ (br $label$break$L8)
+ )
+ )
+ (set_local $$incdec$ptr33
+ (i32.add
+ (get_local $$s$128)
+ (i32.const 1)
+ )
+ )
+ (set_local $$dec34
+ (i32.add
+ (get_local $$n$addr$227)
+ (i32.const -1)
+ )
+ )
+ (set_local $$tobool25
+ (i32.eq
+ (get_local $$dec34)
+ (i32.const 0)
+ )
+ )
+ (if
+ (get_local $$tobool25)
+ (block
+ (set_local $$n$addr$3
+ (i32.const 0)
+ )
+ (set_local $$s$2
+ (get_local $$incdec$ptr33)
+ )
+ (br $while-out4)
+ )
+ (block
+ (set_local $$n$addr$227
+ (get_local $$dec34)
+ )
+ (set_local $$s$128
+ (get_local $$incdec$ptr33)
+ )
+ )
+ )
+ (br $while-in5)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (set_local $$tobool36
+ (i32.ne
+ (get_local $$n$addr$3)
+ (i32.const 0)
+ )
+ )
+ (set_local $$cond
+ (if i32
+ (get_local $$tobool36)
+ (get_local $$s$2)
+ (i32.const 0)
+ )
+ )
+ (return
+ (get_local $$cond)
+ )
+ )
(func $keepAlive
(call $loads)
(call $stores)
@@ -934,6 +1514,18 @@
(i32.const 0)
(i32.const 0)
)
+ (drop
+ (call $_memchr
+ (i32.const 0)
+ (i32.const 0)
+ (i32.const 0)
+ )
+ )
+ (drop
+ (call $switch64TOOMUCH
+ (i64.const 0)
+ )
+ )
)
(func $__emscripten_dceable_type_decls
(drop