summaryrefslogtreecommitdiff
path: root/test/wasm-only.fromasm.imprecise.no-opts
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-11-20 14:08:28 -0800
committerGitHub <noreply@github.com>2018-11-20 14:08:28 -0800
commit44335674936254ef6f8695883e4376a9d5fd1521 (patch)
tree035fbe66e1dfb997d9921b40f205c4bb8c006d4f /test/wasm-only.fromasm.imprecise.no-opts
parent7ca9e24aa22bc57a4d37d3018cd02cf39cd9957a (diff)
downloadbinaryen-44335674936254ef6f8695883e4376a9d5fd1521.tar.gz
binaryen-44335674936254ef6f8695883e4376a9d5fd1521.tar.bz2
binaryen-44335674936254ef6f8695883e4376a9d5fd1521.zip
Use getTempRet0/setTempRet0 in LegalizeJSInterface.cpp (#1709)
Its simpler if we always import these functions from the embedder rather then synthesizing them various placed. This is part of a 4 part change: LLVM: https://reviews.llvm.org/D53240 fastcomp: https://github.com/kripken/emscripten-fastcomp/pull/237 emscripten: https://github.com/kripken/emscripten/pull/7358 binaryen: https://github.com/kripken/emscripten/pull/7358 Fixes: https://github.com/kripken/emscripten/issues/7273 Fixes: https://github.com/kripken/emscripten/issues/7304
Diffstat (limited to 'test/wasm-only.fromasm.imprecise.no-opts')
-rw-r--r--test/wasm-only.fromasm.imprecise.no-opts77
1 files changed, 35 insertions, 42 deletions
diff --git a/test/wasm-only.fromasm.imprecise.no-opts b/test/wasm-only.fromasm.imprecise.no-opts
index 7cf7e7282..cc5b63bfa 100644
--- a/test/wasm-only.fromasm.imprecise.no-opts
+++ b/test/wasm-only.fromasm.imprecise.no-opts
@@ -3,7 +3,9 @@
(type $FUNCSIG$j (func (result i64)))
(type $FUNCSIG$ff (func (param f32) (result f32)))
(type $FUNCSIG$v (func))
+ (type $FUNCSIG$vi (func (param i32)))
(type $legaltype$illegalImport (func (param f64 i32 i32 i32)))
+ (type $FUNCSIG$i (func (result i32)))
(type $legaltype$illegalImportResult (func (result i32)))
(type $legaltype$_fabsf (func (param f64) (result f64)))
(type $legaltype$do_i64 (func (result i32)))
@@ -14,19 +16,18 @@
(import "env" "__table_base" (global $__table_base i32))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "abort" (func $abort))
+ (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" "_fabsf" (func $legalimport$_fabsf (param f64) (result f64)))
(import "env" "do_i64" (func $legalimport$do_i64 (result i32)))
(global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import))
- (global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $test64))
(export "illegalParam" (func $legalstub$illegalParam))
(export "illegalResult" (func $legalstub$illegalResult))
(export "keepAlive" (func $keepAlive))
- (export "getTempRet0" (func $getTempRet0))
- (export "setTempRet0" (func $setTempRet0))
- (func $loads (; 5 ;)
+ (func $loads (; 7 ;)
(local $i i32)
(local $f f32)
(local $d f64)
@@ -141,7 +142,7 @@
)
)
)
- (func $stores (; 6 ;)
+ (func $stores (; 8 ;)
(local $i i32)
(local $f f32)
(local $d f64)
@@ -234,7 +235,7 @@
(get_local $d)
)
)
- (func $test (; 7 ;)
+ (func $test (; 9 ;)
(local $i i32)
(local $j i64)
(local $f f32)
@@ -280,7 +281,7 @@
)
)
)
- (func $test64 (; 8 ;)
+ (func $test64 (; 10 ;)
(local $x i64)
(local $y i64)
(local $z i32)
@@ -552,7 +553,7 @@
)
)
)
- (func $imports (; 9 ;) (result i64)
+ (func $imports (; 11 ;) (result i64)
(call $legalfunc$illegalImport
(f64.const -3.13159)
(i64.const 94489280523)
@@ -562,7 +563,7 @@
(call $legalfunc$illegalImportResult)
)
)
- (func $arg (; 10 ;) (param $x i64)
+ (func $arg (; 12 ;) (param $x i64)
(i64.store
(i32.const 100)
(get_local $x)
@@ -571,7 +572,7 @@
(get_local $x)
)
)
- (func $illegalParam (; 11 ;) (param $a i32) (param $x i64) (param $b f64)
+ (func $illegalParam (; 13 ;) (param $a i32) (param $x i64) (param $b f64)
(i32.store
(i32.const 50)
(get_local $a)
@@ -590,17 +591,17 @@
(f64.const 12.34)
)
)
- (func $result (; 12 ;) (result i64)
+ (func $result (; 14 ;) (result i64)
(return
(i64.const 8589934593)
)
)
- (func $illegalResult (; 13 ;) (result i64)
+ (func $illegalResult (; 15 ;) (result i64)
(return
(i64.const 8589934593)
)
)
- (func $call1 (; 14 ;) (param $x i64) (result i64)
+ (func $call1 (; 16 ;) (param $x i64) (result i64)
(local $y i64)
(set_local $y
(call $call1
@@ -611,7 +612,7 @@
(get_local $y)
)
)
- (func $call2 (; 15 ;) (param $x i64) (result i64)
+ (func $call2 (; 17 ;) (param $x i64) (result i64)
(drop
(call $call2
(call $call2
@@ -623,12 +624,12 @@
(i64.const 245127260211081)
)
)
- (func $returnCastConst (; 16 ;) (result i64)
+ (func $returnCastConst (; 18 ;) (result i64)
(return
(i64.const 0)
)
)
- (func $ifValue64 (; 17 ;) (param $$4 i64) (param $$6 i64) (result i64)
+ (func $ifValue64 (; 19 ;) (param $$4 i64) (param $$6 i64) (result i64)
(local $$$0 i64)
(local $$9 i64)
(local $$10 i64)
@@ -661,7 +662,7 @@
(get_local $$$0)
)
)
- (func $ifValue32 (; 18 ;) (param $$4 i32) (param $$6 i32) (result i32)
+ (func $ifValue32 (; 20 ;) (param $$4 i32) (param $$6 i32) (result i32)
(local $$$0 i32)
(local $$9 i32)
(local $$10 i32)
@@ -694,7 +695,7 @@
(get_local $$$0)
)
)
- (func $switch64 (; 19 ;) (param $$a444 i64) (result i32)
+ (func $switch64 (; 21 ;) (param $$a444 i64) (result i32)
(local $$waka i32)
(local $2 i64)
(block $switch
@@ -745,7 +746,7 @@
(get_local $$waka)
)
)
- (func $unreachable_leftovers (; 20 ;) (param $$0 i32) (param $$1 i32) (param $$2 i32)
+ (func $unreachable_leftovers (; 22 ;) (param $$0 i32) (param $$1 i32) (param $$2 i32)
(local $label i32)
(block $label$break$L1
(if
@@ -781,7 +782,7 @@
)
(return)
)
- (func $switch64TOOMUCH (; 21 ;) (param $$a444 i64) (result i32)
+ (func $switch64TOOMUCH (; 23 ;) (param $$a444 i64) (result i32)
(local $$waka i32)
(local $2 i64)
(local $3 i32)
@@ -913,7 +914,7 @@
(i32.const 44)
)
)
- (func $_memchr (; 22 ;) (param $$src i32) (param $$c i32) (param $$n i32) (result i32)
+ (func $_memchr (; 24 ;) (param $$src i32) (param $$c i32) (param $$n i32) (result i32)
(local $$0 i32)
(local $$1 i32)
(local $$2 i32)
@@ -1491,7 +1492,7 @@
(get_local $$cond)
)
)
- (func $switch64_big_condition1 (; 23 ;) (param $$x i64)
+ (func $switch64_big_condition1 (; 25 ;) (param $$x i64)
(local $1 i64)
(block $switch
(block $switch-default
@@ -1526,7 +1527,7 @@
(return)
)
)
- (func $switch64_big_condition2 (; 24 ;) (param $$x i64)
+ (func $switch64_big_condition2 (; 26 ;) (param $$x i64)
(local $1 i64)
(block $switch
(block $switch-case
@@ -1558,7 +1559,7 @@
)
)
)
- (func $keepAlive (; 25 ;)
+ (func $keepAlive (; 27 ;)
(call $loads)
(call $loads)
(call $stores)
@@ -1666,7 +1667,7 @@
(i64.const 0)
)
)
- (func $__emscripten_dceable_type_decls (; 26 ;)
+ (func $__emscripten_dceable_type_decls (; 28 ;)
(drop
(call $legalfunc$_fabsf
(f32.const 0)
@@ -1676,7 +1677,7 @@
(call $legalfunc$do_i64)
)
)
- (func $legalstub$illegalParam (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64)
+ (func $legalstub$illegalParam (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 f64)
(call $illegalParam
(get_local $0)
(i64.or
@@ -1693,12 +1694,12 @@
(get_local $3)
)
)
- (func $legalstub$illegalResult (; 28 ;) (result i32)
+ (func $legalstub$illegalResult (; 30 ;) (result i32)
(local $0 i64)
(set_local $0
(call $illegalResult)
)
- (set_global $tempRet0
+ (call $setTempRet0
(i32.wrap/i64
(i64.shr_u
(get_local $0)
@@ -1710,7 +1711,7 @@
(get_local $0)
)
)
- (func $legalfunc$illegalImport (; 29 ;) (param $0 f64) (param $1 i64) (param $2 i32)
+ (func $legalfunc$illegalImport (; 31 ;) (param $0 f64) (param $1 i64) (param $2 i32)
(call $legalimport$illegalImport
(get_local $0)
(i32.wrap/i64
@@ -1725,20 +1726,20 @@
(get_local $2)
)
)
- (func $legalfunc$illegalImportResult (; 30 ;) (result i64)
+ (func $legalfunc$illegalImportResult (; 32 ;) (result i64)
(i64.or
(i64.extend_u/i32
(call $legalimport$illegalImportResult)
)
(i64.shl
(i64.extend_u/i32
- (get_global $tempRet0)
+ (call $getTempRet0)
)
(i64.const 32)
)
)
)
- (func $legalfunc$_fabsf (; 31 ;) (param $0 f32) (result f32)
+ (func $legalfunc$_fabsf (; 33 ;) (param $0 f32) (result f32)
(f32.demote/f64
(call $legalimport$_fabsf
(f64.promote/f32
@@ -1747,25 +1748,17 @@
)
)
)
- (func $legalfunc$do_i64 (; 32 ;) (result i64)
+ (func $legalfunc$do_i64 (; 34 ;) (result i64)
(i64.or
(i64.extend_u/i32
(call $legalimport$do_i64)
)
(i64.shl
(i64.extend_u/i32
- (get_global $tempRet0)
+ (call $getTempRet0)
)
(i64.const 32)
)
)
)
- (func $getTempRet0 (; 33 ;) (result i32)
- (get_global $tempRet0)
- )
- (func $setTempRet0 (; 34 ;) (param $0 i32)
- (set_global $tempRet0
- (get_local $0)
- )
- )
)