diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-16 17:55:42 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-16 18:13:49 -0800 |
commit | df2d946238e80e2b3ef6b198301b3947e28646dd (patch) | |
tree | cb14736ec0f905d365815a0c8ddafda4cab3152d /src/js | |
parent | 797dd8d4119e0b02abd3ddd4d99557d8dfe591e9 (diff) | |
download | binaryen-df2d946238e80e2b3ef6b198301b3947e28646dd.tar.gz binaryen-df2d946238e80e2b3ef6b198301b3947e28646dd.tar.bz2 binaryen-df2d946238e80e2b3ef6b198301b3947e28646dd.zip |
emit a special call to a special import to handle floating-point remainder, which exists in asm.js but not in wasm
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/post.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/post.js b/src/js/post.js index 45d850f10..6406674ba 100644 --- a/src/js/post.js +++ b/src/js/post.js @@ -28,6 +28,11 @@ var info = wasmJS['info'] = { global: null, env: null, + asm2wasm: { // special asm2wasm imports + "f64-rem": function(x, y) { + return x % y; + }, + }, parent: Module // Module inside wasm-js.cpp refers to wasm-js.cpp; this allows access to the outside program. }; |