summaryrefslogtreecommitdiff
path: root/test/unit.wast.fromBinary
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit.wast.fromBinary')
-rw-r--r--test/unit.wast.fromBinary68
1 files changed, 35 insertions, 33 deletions
diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary
index de479dea7..7c5e00b94 100644
--- a/test/unit.wast.fromBinary
+++ b/test/unit.wast.fromBinary
@@ -1,5 +1,7 @@
(module
- (memory 4096 4096)
+ (memory 4096 4096
+ (segment 1026 "\14\00")
+ )
(type $0 (func (param f32)))
(type $1 (func))
(type $2 (func (param f64) (result i32)))
@@ -8,11 +10,11 @@
(type $5 (func (result i32)))
(type $6 (func (param i32) (result i32)))
(import $_emscripten_asm_const_vi "env" "_emscripten_asm_const_vi")
- (import $f64-to-int "env" "f64-to-int" (param f64) (result i32))
- (import $f64-rem "env" "f64-rem" (param f64 f64) (result f64))
+ (import $f64-to-int "asm2wasm" "f64-to-int" (param f64) (result i32))
+ (import $f64-rem "asm2wasm" "f64-rem" (param f64 f64) (result f64))
(export "big_negative" $big_negative)
(table $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg)
- (func $big_negative
+ (func $big_negative (type $1)
(local $var$0 f64)
(block $label$0
(set_local $var$0
@@ -32,7 +34,7 @@
)
)
)
- (func $importedDoubles (result f64)
+ (func $importedDoubles (type $4) (result f64)
(local $var$0 f64)
(block $label$0
(set_local $var$0
@@ -84,7 +86,7 @@
(f64.const 1.2)
)
)
- (func $doubleCompares (param $var$0 f64) (param $var$1 f64) (result f64)
+ (func $doubleCompares (type $3) (param $var$0 f64) (param $var$1 f64) (result f64)
(local $var$2 i32)
(local $var$3 f64)
(local $var$4 f64)
@@ -128,14 +130,14 @@
(get_local $var$1)
)
)
- (func $intOps (result i32)
+ (func $intOps (type $5) (result i32)
(local $var$0 i32)
(i32.eq
(get_local $var$0)
(i32.const 0)
)
)
- (func $conversions
+ (func $conversions (type $1)
(local $var$0 i32)
(local $var$1 f64)
(block $label$0
@@ -159,7 +161,7 @@
)
)
)
- (func $seq
+ (func $seq (type $1)
(local $var$0 f64)
(set_local $var$0
(f64.sub
@@ -174,7 +176,7 @@
)
)
)
- (func $switcher (param $var$0 i32) (result i32)
+ (func $switcher (type $6) (param $var$0 i32) (result i32)
(block $label$0
(tableswitch $label$4
(i32.sub
@@ -201,18 +203,18 @@
(get_local $var$0)
(i32.const 5)
)
- (table (case $label$5) (case $label$6) (case $label$6) (case $label$6) (case $label$6) (case $label$6) (case $label$6) (case $label$7)) (case $label$6)
- (case $label$7
+ (table (case $label$6) (case $label$7) (case $label$7) (case $label$7) (case $label$7) (case $label$7) (case $label$7) (case $label$5)) (case $label$7)
+ (case $label$5
(br $label$0
(i32.const 121)
)
)
- (case $label$5
+ (case $label$6
(br $label$0
(i32.const 51)
)
)
- (case $label$6
+ (case $label$7
(nop)
)
)
@@ -221,11 +223,11 @@
(get_local $var$0)
(i32.const 2)
)
- (table (case $label$9) (case $label$10) (case $label$10) (case $label$11) (case $label$10) (case $label$10) (case $label$10) (case $label$10) (case $label$12) (case $label$10) (case $label$13)) (case $label$10)
- (case $label$13
+ (table (case $label$12) (case $label$13) (case $label$13) (case $label$11) (case $label$13) (case $label$13) (case $label$13) (case $label$13) (case $label$10) (case $label$13) (case $label$9)) (case $label$13)
+ (case $label$9
(br $label$14)
)
- (case $label$12
+ (case $label$10
(br $label$14)
)
(case $label$11
@@ -239,7 +241,7 @@
(br $label$14)
)
)
- (case $label$9
+ (case $label$12
(block $label$19
(loop $label$20 $label$21
(block $label$22
@@ -250,40 +252,40 @@
(br $label$14)
)
)
- (case $label$10
+ (case $label$13
(nop)
)
)
(i32.const 0)
)
)
- (func $blocker
+ (func $blocker (type $1)
(block $label$0
(br $label$0)
)
)
- (func $frem (result f64)
+ (func $frem (type $4) (result f64)
(call_import $f64-rem
(f64.const 5.5)
(f64.const 1.2)
)
)
- (func $big_uint_div_u (result i32)
+ (func $big_uint_div_u (type $5) (result i32)
(local $var$0 i32)
(block $label$0
(set_local $var$0
(i32.and
(i32.div_u
- (i32.const 255)
+ (i32.const -1)
(i32.const 2)
)
- (i32.const 255)
+ (i32.const -1)
)
)
(get_local $var$0)
)
)
- (func $fr (param $var$0 f32)
+ (func $fr (type $0) (param $var$0 f32)
(local $var$1 f32)
(local $var$2 f64)
(block $label$0
@@ -297,10 +299,10 @@
(f32.const 0)
)
)
- (func $negZero (result f64)
+ (func $negZero (type $4) (result f64)
(f64.const -0)
)
- (func $abs
+ (func $abs (type $1)
(local $var$0 i32)
(local $var$1 i32)
(local $var$2 f32)
@@ -336,7 +338,7 @@
)
)
)
- (func $neg
+ (func $neg (type $1)
(local $var$0 f32)
(block $label$0
(set_local $var$0
@@ -356,7 +358,7 @@
)
)
)
- (func $cneg (param $var$0 f32)
+ (func $cneg (type $0) (param $var$0 f32)
(call_indirect $0
(i32.add
(i32.and
@@ -368,7 +370,7 @@
(get_local $var$0)
)
)
- (func $___syscall_ret
+ (func $___syscall_ret (type $1)
(local $var$0 i32)
(i32.gt_u
(i32.shr_u
@@ -378,13 +380,13 @@
(i32.const -4096)
)
)
- (func $z
+ (func $z (type $1)
(nop)
)
- (func $w
+ (func $w (type $1)
(nop)
)
- (func $block_and_after (result i32)
+ (func $block_and_after (type $5) (result i32)
(block $label$0
(block $label$1
(i32.const 1)