summaryrefslogtreecommitdiff
path: root/test/unit.fromasm
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit.fromasm')
-rw-r--r--test/unit.fromasm153
1 files changed, 72 insertions, 81 deletions
diff --git a/test/unit.fromasm b/test/unit.fromasm
index 41e1154b5..75851c83f 100644
--- a/test/unit.fromasm
+++ b/test/unit.fromasm
@@ -66,12 +66,12 @@
)
(f64.const 1.2)
)
- (func $doubleCompares (param $x f64) (param $y f64) (result f64)
- (local $Int f64)
- (local $Double i32)
+ (func $doubleCompares (param $0 f64) (param $1 f64) (result f64)
+ (local $2 f64)
+ (local $3 i32)
(if
(f64.gt
- (get_local $x)
+ (get_local $0)
(f64.const 0)
)
(return
@@ -80,7 +80,7 @@
)
(if
(f64.gt
- (get_local $Int)
+ (get_local $2)
(f64.const 0)
)
(return
@@ -89,7 +89,7 @@
)
(if
(i32.gt_s
- (get_local $Double)
+ (get_local $3)
(i32.const 0)
)
(return
@@ -98,19 +98,19 @@
)
(if
(f64.lt
- (get_local $x)
- (get_local $y)
+ (get_local $0)
+ (get_local $1)
)
(return
- (get_local $x)
+ (get_local $0)
)
)
- (get_local $y)
+ (get_local $1)
)
(func $intOps (result i32)
- (local $x i32)
+ (local $0 i32)
(i32.eqz
- (get_local $x)
+ (get_local $0)
)
)
(func $hexLiterals
@@ -123,29 +123,23 @@
)
)
(func $conversions
- (local $i i32)
- (local $d f64)
- (local $f f32)
- (set_local $i
- (call_import $f64-to-int
- (get_local $d)
- )
- )
- (set_local $d
- (f64.convert_s/i32
- (set_local $i
- (call_import $f64-to-int
- (f64.promote/f32
- (get_local $f)
- )
+ (local $0 i32)
+ (local $1 f64)
+ (local $2 f32)
+ (call_import $f64-to-int
+ (get_local $1)
+ )
+ (f64.convert_s/i32
+ (set_local $0
+ (call_import $f64-to-int
+ (f64.promote/f32
+ (get_local $2)
)
)
)
)
- (set_local $d
- (f64.convert_u/i32
- (get_local $i)
- )
+ (f64.convert_u/i32
+ (get_local $0)
)
)
(func $seq
@@ -160,13 +154,13 @@
)
)
)
- (func $switcher (param $x i32) (result i32)
+ (func $switcher (param $0 i32) (result i32)
(block $switch-default$3
(block $switch-case$2
(block $switch-case$1
(br_table $switch-case$1 $switch-case$2 $switch-default$3
(i32.sub
- (get_local $x)
+ (get_local $0)
(i32.const 1)
)
)
@@ -184,7 +178,7 @@
(block $switch-case$5
(br_table $switch-case$6 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-case$5 $switch-default$7
(i32.sub
- (get_local $x)
+ (get_local $0)
(i32.const 5)
)
)
@@ -205,7 +199,7 @@
(block $switch-case$8
(br_table $switch-case$15 $switch-default$16 $switch-default$16 $switch-case$12 $switch-default$16 $switch-default$16 $switch-default$16 $switch-default$16 $switch-case$9 $switch-default$16 $switch-case$8 $switch-default$16
(i32.sub
- (get_local $x)
+ (get_local $0)
(i32.const 2)
)
)
@@ -234,7 +228,7 @@
(block $switch-case$18
(br_table $switch-case$18 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$20 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-default$21 $switch-case$19 $switch-default$21
(i32.sub
- (get_local $x)
+ (get_local $0)
(i32.const -1)
)
)
@@ -276,13 +270,12 @@
(i32.const -1)
)
)
- (func $fr (param $x f32)
- (local $y f32)
- (local $z f64)
+ (func $fr (param $0 f32)
+ (local $1 f64)
(f32.demote/f64
- (get_local $z)
+ (get_local $1)
)
- (get_local $y)
+ (get_local $0)
(f32.const 5)
(f32.const 0)
(f32.const 5)
@@ -292,17 +285,17 @@
(f64.const -0)
)
(func $abs
- (local $asm2wasm_i32_temp i32)
+ (local $0 i32)
(select
(i32.sub
(i32.const 0)
- (set_local $asm2wasm_i32_temp
+ (set_local $0
(i32.const 0)
)
)
- (get_local $asm2wasm_i32_temp)
+ (get_local $0)
(i32.lt_s
- (get_local $asm2wasm_i32_temp)
+ (get_local $0)
(i32.const 0)
)
)
@@ -314,7 +307,7 @@
)
)
(func $neg
- (local $x f32)
+ (local $0 f32)
(call_indirect $FUNCSIG$vf
(i32.add
(i32.and
@@ -323,14 +316,12 @@
)
(i32.const 8)
)
- (set_local $x
- (f32.neg
- (get_local $x)
- )
+ (f32.neg
+ (get_local $0)
)
)
)
- (func $cneg (param $x f32)
+ (func $cneg (param $0 f32)
(call_indirect $FUNCSIG$vf
(i32.add
(i32.and
@@ -339,44 +330,44 @@
)
(i32.const 8)
)
- (get_local $x)
+ (get_local $0)
)
)
(func $___syscall_ret
- (local $$0 i32)
+ (local $0 i32)
(i32.gt_u
- (get_local $$0)
+ (get_local $0)
(i32.const -4096)
)
)
(func $smallCompare (result i32)
- (local $i i32)
- (local $j i32)
+ (local $0 i32)
+ (local $1 i32)
(if
(i32.lt_s
- (get_local $i)
- (get_local $j)
+ (get_local $0)
+ (get_local $1)
)
- (set_local $i
+ (set_local $0
(i32.add
- (get_local $i)
+ (get_local $0)
(i32.const 1)
)
)
)
(if
(i32.lt_u
- (get_local $i)
- (get_local $j)
+ (get_local $0)
+ (get_local $1)
)
- (set_local $i
+ (set_local $0
(i32.add
- (get_local $i)
+ (get_local $0)
(i32.const 1)
)
)
)
- (get_local $i)
+ (get_local $0)
)
(func $cneg_nosemicolon
(call_indirect $FUNCSIG$vi
@@ -391,40 +382,40 @@
)
)
(func $forLoop
- (local $i i32)
- (set_local $i
+ (local $0 i32)
+ (set_local $0
(i32.const 1)
)
(loop $for-out$0 $for-in$1
(br_if $for-out$0
(i32.ge_s
- (get_local $i)
+ (get_local $0)
(i32.const 200)
)
)
(call_import $h
- (get_local $i)
+ (get_local $0)
)
- (set_local $i
+ (set_local $0
(i32.add
- (get_local $i)
+ (get_local $0)
(i32.const 1)
)
)
(br $for-in$1)
)
)
- (func $ceiling_32_64 (param $u f32) (param $B f64)
+ (func $ceiling_32_64 (param $0 f32) (param $1 f64)
(f32.demote/f64
(f64.ceil
- (get_local $B)
+ (get_local $1)
)
)
(f32.mul
- (get_local $u)
+ (get_local $0)
(f32.ceil
(f32.demote/f64
- (get_local $B)
+ (get_local $1)
)
)
)
@@ -459,22 +450,22 @@
(br $while-in$1)
)
)
- (func $bitcasts (param $i i32) (param $f f32)
- (local $d f64)
+ (func $bitcasts (param $0 i32) (param $1 f32)
+ (local $2 f64)
(f32.reinterpret/i32
- (get_local $i)
+ (get_local $0)
)
(f64.promote/f32
(f32.reinterpret/i32
- (get_local $i)
+ (get_local $0)
)
)
(i32.reinterpret/f32
- (get_local $f)
+ (get_local $1)
)
(i32.reinterpret/f32
(f32.demote/f64
- (get_local $d)
+ (get_local $2)
)
)
)