diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-28 20:07:28 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-28 20:16:52 -0800 |
commit | d8f258e8e74b17d06ee7d94fc7c4dd3165819f0d (patch) | |
tree | 16c6706992f27a2e86fc9c112838aa168d2b637f /test | |
parent | 37b7e93a71e1a51fcb826cb2bce88f47bd396674 (diff) | |
download | binaryen-d8f258e8e74b17d06ee7d94fc7c4dd3165819f0d.tar.gz binaryen-d8f258e8e74b17d06ee7d94fc7c4dd3165819f0d.tar.bz2 binaryen-d8f258e8e74b17d06ee7d94fc7c4dd3165819f0d.zip |
be very careful when converting doubles to ints in asm2wasm
Diffstat (limited to 'test')
-rw-r--r-- | test/emcc_O2_hello_world.wast | 4 | ||||
-rw-r--r-- | test/emcc_hello_world.wast | 8 | ||||
-rw-r--r-- | test/unit.asm.js | 4 | ||||
-rw-r--r-- | test/unit.wast | 12 |
4 files changed, 21 insertions, 7 deletions
diff --git a/test/emcc_O2_hello_world.wast b/test/emcc_O2_hello_world.wast index 3e580d2d4..66d772963 100644 --- a/test/emcc_O2_hello_world.wast +++ b/test/emcc_O2_hello_world.wast @@ -1730,7 +1730,7 @@ (get_local $i1) (i32.const 0) ) - (i32.const -2147483648) + (i32.const -65) ) (block (set_local $i7 @@ -12453,7 +12453,7 @@ (get_local $i1) (i32.const 0) ) - (i32.const -2147483648) + (i32.const -4096) ) (block (i32.store align=4 diff --git a/test/emcc_hello_world.wast b/test/emcc_hello_world.wast index ae799429b..d33811b80 100644 --- a/test/emcc_hello_world.wast +++ b/test/emcc_hello_world.wast @@ -4510,7 +4510,7 @@ (get_local $$r) (i32.const 0) ) - (i32.const -2147483648) + (i32.const -4096) ) ) (if_else @@ -16251,7 +16251,7 @@ (get_local $$0) (i32.const 0) ) - (i32.const -2147483648) + (i32.const -1) ) ) (set_local $$4 @@ -16349,7 +16349,7 @@ (get_local $$7) (i32.const 0) ) - (i32.const -2147483648) + (i32.const -1) ) ) (set_local $$17 @@ -20126,7 +20126,7 @@ (get_local $$bytes) (i32.const 0) ) - (i32.const -2147483648) + (i32.const -65) ) ) (if_else diff --git a/test/unit.asm.js b/test/unit.asm.js index 1540beb72..cef639837 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -112,6 +112,10 @@ function () { x = -x; FUNCTION_TABLE_c[1 & 7](x); } + function ___syscall_ret() { + var $0 = 0; + ($0>>>0) > 4294963200; // -4096 + } function z() { } diff --git a/test/unit.wast b/test/unit.wast index c965d30b3..0c08b39c8 100644 --- a/test/unit.wast +++ b/test/unit.wast @@ -267,7 +267,7 @@ (set_local $x (i32.and (i32.div_u - (i32.const -2147483648) + (i32.const -1) (i32.const 2) ) (i32.const -1) @@ -349,6 +349,16 @@ ) ) ) + (func $___syscall_ret + (local $$0 i32) + (i32.gt_u + (i32.shr_u + (get_local $$0) + (i32.const 0) + ) + (i32.const -4096) + ) + ) (func $z (nop) ) |