diff options
Diffstat (limited to 'test/unit.fromasm')
-rw-r--r-- | test/unit.fromasm | 52 |
1 files changed, 45 insertions, 7 deletions
diff --git a/test/unit.fromasm b/test/unit.fromasm index bc77525c6..3db25c78b 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -6,6 +6,8 @@ (type $FUNCSIG$vf (func (param f32))) (type $FUNCSIG$vi (func (param i32))) (import $abort "env" "abort" (param i32)) + (import $print "env" "print" (param i32)) + (import $h "env" "h" (param i32)) (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) @@ -127,9 +129,8 @@ (func $intOps (result i32) (local $x i32) (return - (i32.eq + (i32.eqz (get_local $x) - (i32.const 0) ) ) ) @@ -176,6 +177,7 @@ ) ) (func $switcher (param $x i32) (result i32) + (local $waka i32) (block $switch-default$3 (block $switch-case$2 (block $switch-case$1 @@ -242,6 +244,42 @@ (br $label$break$Lout) ) ) + (loop $label$break$L1 $label$continue$L1 + (loop $label$break$L3 $label$continue$L3 + (block $switch$17 + (block $switch-default$21 + (block $switch-default$21 + (block $switch-case$20 + (block $switch-case$19 + (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) + (i32.const -1) + ) + ) + ) + (br $label$break$L1) + (br $switch$17) + ) + (set_local $waka + (i32.const 1) + ) + (br $switch$17) + ) + (br $label$break$L3) + (br $switch$17) + ) + (br $label$break$L1) + ) + ) + (br $label$continue$L3) + ) + (call_import $h + (i32.const 120) + ) + (br $label$continue$L1) + ) (return (i32.const 0) ) @@ -416,7 +454,7 @@ (nop) (br $for-out$0) ) - (call $h + (call_import $h (get_local $i) ) (set_local $i @@ -461,18 +499,18 @@ ) (func $continues (loop $while-out$0 $while-in$1 - (call $print + (call_import $print (i32.const 1) ) (loop $do-once$2 $unlikely-continue$3 - (call $print + (call_import $print (i32.const 5) ) (br_if $unlikely-continue$3 - (call $check) + (i32.const 0) ) ) - (call $print + (call_import $print (i32.const 2) ) (br $while-in$1) |