summaryrefslogtreecommitdiff
path: root/test/two_sides.fromasm
diff options
context:
space:
mode:
Diffstat (limited to 'test/two_sides.fromasm')
-rw-r--r--test/two_sides.fromasm14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm
index 98ca149e1..6d8e2a14b 100644
--- a/test/two_sides.fromasm
+++ b/test/two_sides.fromasm
@@ -1,9 +1,13 @@
(module
(memory 256 256)
- (export "memory" memory)
+ (data (get_global $memoryBase) "two_sides.asm.js")
(type $FUNCSIG$id (func (param f64) (result i32)))
- (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32))
- (export "_test" $_test)
+ (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32)))
+ (import "env" "memory" (memory $memory))
+ (import "env" "table" (table $table))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
+ (export "_test" (func $_test))
(func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(local $5 f64)
(if
@@ -14,7 +18,7 @@
(f64.convert_s/i32
(get_local $2)
)
- (set_local $5
+ (tee_local $5
(f64.convert_s/i32
(i32.mul
(get_local $1)
@@ -37,7 +41,7 @@
(f64.convert_s/i32
(get_local $2)
)
- (set_local $5
+ (tee_local $5
(f64.convert_s/i32
(i32.mul
(get_local $3)