diff options
Diffstat (limited to 'test/passes/post-emscripten.wast')
-rw-r--r-- | test/passes/post-emscripten.wast | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/test/passes/post-emscripten.wast b/test/passes/post-emscripten.wast index f262975f5..5c255ffca 100644 --- a/test/passes/post-emscripten.wast +++ b/test/passes/post-emscripten.wast @@ -1,6 +1,7 @@ (module (memory 256 256) (type $0 (func (param i32))) + (import "global.Math" "pow" (func $Math_pow (param f64 f64) (result f64))) (func $b0 (type $0) (param $x i32) (drop (i32.load @@ -152,4 +153,59 @@ ) ) ) + (func $pow2 + (local $x f64) + (local $y f64) + (drop + (call $Math_pow + (f64.const 1) + (f64.const 2) + ) + ) + (drop + (call $Math_pow + (f64.const 1) + (f64.const 3) + ) + ) + (drop + (call $Math_pow + (f64.const 2) + (f64.const 1) + ) + ) + (set_local $x (f64.const 5)) + (drop + (call $Math_pow + (get_local $x) + (f64.const 2) + ) + ) + (drop + (call $Math_pow + (tee_local $y (f64.const 7)) + (f64.const 2) + ) + ) + (drop + (call $Math_pow + (f64.const 8) + (f64.const 2) + ) + ) + ) + (func $pow.2 + (drop + (call $Math_pow + (f64.const 1) + (f64.const 0.5) + ) + ) + (drop + (call $Math_pow + (f64.const 1) + (f64.const 0.51) + ) + ) + ) ) |