diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-03-04 18:45:06 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-03-07 13:20:39 -0800 |
commit | 6edb9f8958f155e289babad80fa234c2074af4d2 (patch) | |
tree | 9a1c912a2635a850661c199dcc02082b17604eed /test | |
parent | 2e761e571f7b3d3df7ba7407a13b37c81ee4e9eb (diff) | |
download | binaryen-6edb9f8958f155e289babad80fa234c2074af4d2.tar.gz binaryen-6edb9f8958f155e289babad80fa234c2074af4d2.tar.bz2 binaryen-6edb9f8958f155e289babad80fa234c2074af4d2.zip |
min test fixes
Diffstat (limited to 'test')
-rw-r--r-- | test/min.2asm.js | 1 | ||||
-rw-r--r-- | test/min.asm.js | 1 | ||||
-rw-r--r-- | test/min.fromasm | 5 | ||||
-rw-r--r-- | test/min.wast.fromBinary | 4 | ||||
-rw-r--r-- | test/print/min.minified.txt | 2 |
5 files changed, 9 insertions, 4 deletions
diff --git a/test/min.2asm.js b/test/min.2asm.js index ea1d2d83f..647a3a38c 100644 --- a/test/min.2asm.js +++ b/test/min.2asm.js @@ -28,6 +28,7 @@ function asmFunc(global, env, buffer) { } wasm2asm_f32$0 = Math_fround(-wasm2asm_f32$1); n = wasm2asm_f32$0; + return Math_fround(wasm2asm_f32$0); } function littleswitch(x) { diff --git a/test/min.asm.js b/test/min.asm.js index d4efa3bca..77e54caab 100644 --- a/test/min.asm.js +++ b/test/min.asm.js @@ -16,6 +16,7 @@ function (global, env, buffer) { p = p | 0; var n = fr(0); n = fr(-(c[k >> 2] = p, fr(g[k >> 2]))); + return n; } return { floats: floats }; diff --git a/test/min.fromasm b/test/min.fromasm index a382808d2..4e5c4639d 100644 --- a/test/min.fromasm +++ b/test/min.fromasm @@ -10,7 +10,7 @@ ) ) ) - (func $neg (param $k i32) (param $p i32) + (func $neg (param $k i32) (param $p i32) (result f32) (local $n f32) (set_local $n (f32.neg @@ -25,5 +25,8 @@ ) ) ) + (return + (get_local $n) + ) ) ) diff --git a/test/min.wast.fromBinary b/test/min.wast.fromBinary index 2ca4c14b6..358132c5f 100644 --- a/test/min.wast.fromBinary +++ b/test/min.wast.fromBinary @@ -1,7 +1,7 @@ (module (memory 16777216 16777216) (type $0 (func (param f32) (result f32))) - (type $1 (func (param i32 i32))) + (type $1 (func (param i32 i32) (result f32))) (type $2 (func (param i32) (result i32))) (type $3 (func (param i32 i32 i32) (result i32))) (export "floats" $floats) @@ -12,7 +12,7 @@ (get_local $var$0) ) ) - (func $neg (type $1) (param $var$0 i32) (param $var$1 i32) + (func $neg (type $1) (param $var$0 i32) (param $var$1 i32) (result f32) (local $var$2 f32) (set_local $var$2 (f32.neg diff --git a/test/print/min.minified.txt b/test/print/min.minified.txt index e38662bb1..2b22a7443 100644 --- a/test/print/min.minified.txt +++ b/test/print/min.minified.txt @@ -1 +1 @@ -(module(memory 16777216 16777216)(export "floats" $floats)(func $floats(param $f f32)(result f32)(local $t f32)(f32.add(get_local $t)(get_local $f)))(func $neg(param $k i32)(param $p i32)(result f32)(local $n f32)(set_local $n(f32.neg(block $block0(i32.store(get_local $k)(get_local $p))(f32.load(get_local $k))))))(func $littleswitch(param $x i32)(result i32)(block $topmost(tableswitch $switch$0(i32.sub(get_local $x)(i32.const 1))(table(case $switch-case$1)(case $switch-case$2)) (case $switch-case$1)(case $switch-case$1(br $topmost(i32.const 1)))(case $switch-case$2(br $topmost(i32.const 2))))(i32.const 0)))(func $f1(param $i1 i32)(param $i2 i32)(param $i3 i32)(result i32)(block $topmost(get_local $i3)))) +(module(memory 16777216 16777216)(export "floats" $floats)(func $floats(param $f f32)(result f32)(local $t f32)(f32.add(get_local $t)(get_local $f)))(func $neg(param $k i32)(param $p i32)(result f32)(local $n f32)(set_local $n(f32.neg(block $block0(i32.store(get_local $k)(get_local $p))(f32.load(get_local $k))))))(func $littleswitch(param $x i32)(result i32)(block $topmost(tableswitch $switch$0(i32.sub(get_local $x)(i32.const 1))(table(case $switch-case$1)(case $switch-case$2)) (case $switch-case$1)(case $switch-case$1(br $topmost(i32.const 1)))(case $switch-case$2(br $topmost(i32.const 2))))(i32.const 0)))(func $f1(param $i1 i32)(param $i2 i32)(param $i3 i32)(result i32)(block $topmost(get_local $i3))))
\ No newline at end of file |