diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-03-07 13:56:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-07 13:56:35 -0800 |
commit | 71804e2bfd1ba49b7dd4ce82b6ad26ba13f1bca8 (patch) | |
tree | 7a91f560708b5017cf795850db94267f2cb58f62 /test/hello_world.fromasm.clamp.no-opts | |
parent | a452f92aeb96e9617a20146503720cd5acb64f29 (diff) | |
download | binaryen-71804e2bfd1ba49b7dd4ce82b6ad26ba13f1bca8.tar.gz binaryen-71804e2bfd1ba49b7dd4ce82b6ad26ba13f1bca8.tar.bz2 binaryen-71804e2bfd1ba49b7dd4ce82b6ad26ba13f1bca8.zip |
Use 3 modes for potentially trapping ops in asm2wasm (#929)
* use 3 modes for potentially trapping ops in asm2wasm: allow (just emit a potentially trapping op), js (do exactly what js does, even if it takes a slow ffi to do it), and clamp (avoid the trap by clamping as necessary)
Diffstat (limited to 'test/hello_world.fromasm.clamp.no-opts')
-rw-r--r-- | test/hello_world.fromasm.clamp.no-opts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/hello_world.fromasm.clamp.no-opts b/test/hello_world.fromasm.clamp.no-opts new file mode 100644 index 000000000..dae1480b7 --- /dev/null +++ b/test/hello_world.fromasm.clamp.no-opts @@ -0,0 +1,15 @@ +(module + (import "env" "memory" (memory $0 256 256)) + (import "env" "table" (table 0 0 anyfunc)) + (import "env" "memoryBase" (global $memoryBase i32)) + (import "env" "tableBase" (global $tableBase i32)) + (export "add" (func $add)) + (func $add (param $x i32) (param $y i32) (result i32) + (return + (i32.add + (get_local $x) + (get_local $y) + ) + ) + ) +) |