Commit 4df291a5 authored by Michael Droettboom's avatar Michael Droettboom

Add compiler patch

parent f2e46063
index f6c9842ff..9f83181eb 100644
--- a/emsdk/emscripten/tag-1.38.4/src/support.js
+++ b/emsdk/emscripten/tag-1.38.4/src/support.js
@@ -158,7 +158,33 @@ function loadWebAssemblyModule(binary) {
'Infinity': Infinity,
},
'global.Math': Math,
- env: env
+ env: env,
+ 'asm2wasm': { // special asm2wasm imports
+ "f64-rem": function(x, y) {
+ return x % y;
+ },
+ "debugger": function() {
+ debugger;
+ }
+#if NEED_ALL_ASM2WASM_IMPORTS
+ ,
+ "f64-to-int": function(x) {
+ return x | 0;
+ },
+ "i32s-div": function(x, y) {
+ return ((x | 0) / (y | 0)) | 0;
+ },
+ "i32u-div": function(x, y) {
+ return ((x >>> 0) / (y >>> 0)) >>> 0;
+ },
+ "i32s-rem": function(x, y) {
+ return ((x | 0) % (y | 0)) | 0;
+ },
+ "i32u-rem": function(x, y) {
+ return ((x >>> 0) % (y >>> 0)) >>> 0;
+ }
+#endif // NEED_ALL_ASM2WASM_IMPORTS
+ },
};
#if ASSERTIONS
var oldTable = [];
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment