diff options
-rw-r--r-- | src/wasm2asm.h | 1 | ||||
-rw-r--r-- | test/emcc_O2_hello_world.2asm.js | 1 | ||||
-rw-r--r-- | test/hello_world.2asm.js | 1 | ||||
-rw-r--r-- | test/min.2asm.js | 1 | ||||
-rw-r--r-- | test/unit.2asm.js | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/src/wasm2asm.h b/src/wasm2asm.h index c48834085..a8f8b58ff 100644 --- a/src/wasm2asm.h +++ b/src/wasm2asm.h @@ -243,6 +243,7 @@ void Wasm2AsmBuilder::addBasics(Ref ast) { }; addMath(MATH_IMUL, IMUL); addMath(MATH_FROUND, FROUND); + addMath(MATH_ABS, ABS); } void Wasm2AsmBuilder::addImport(Ref ast, Import *import) { diff --git a/test/emcc_O2_hello_world.2asm.js b/test/emcc_O2_hello_world.2asm.js index 32f41ba64..184a6e34e 100644 --- a/test/emcc_O2_hello_world.2asm.js +++ b/test/emcc_O2_hello_world.2asm.js @@ -10,6 +10,7 @@ function asmFunc(global, env, buffer) { var HEAPF64 = new global.Float64Array(buffer); var Math_imul = global.Math.imul; var Math_fround = global.Math.fround; + var Math_abs = global.Math.abs; var abort = env.abort; var _pthread_cleanup_pop = env._pthread_cleanup_pop; var _pthread_self = env._pthread_self; diff --git a/test/hello_world.2asm.js b/test/hello_world.2asm.js index 650a4f551..ba054a28e 100644 --- a/test/hello_world.2asm.js +++ b/test/hello_world.2asm.js @@ -10,6 +10,7 @@ function asmFunc(global, env, buffer) { var HEAPF64 = new global.Float64Array(buffer); var Math_imul = global.Math.imul; var Math_fround = global.Math.fround; + var Math_abs = global.Math.abs; function add(x, y) { x = x | 0; y = y | 0; diff --git a/test/min.2asm.js b/test/min.2asm.js index 512af46fe..b8865aa81 100644 --- a/test/min.2asm.js +++ b/test/min.2asm.js @@ -10,6 +10,7 @@ function asmFunc(global, env, buffer) { var HEAPF64 = new global.Float64Array(buffer); var Math_imul = global.Math.imul; var Math_fround = global.Math.fround; + var Math_abs = global.Math.abs; function floats(f) { f = Math_fround(f); var t = Math_fround(0); diff --git a/test/unit.2asm.js b/test/unit.2asm.js index def524246..45ffe88f6 100644 --- a/test/unit.2asm.js +++ b/test/unit.2asm.js @@ -10,6 +10,7 @@ function asmFunc(global, env, buffer) { var HEAPF64 = new global.Float64Array(buffer); var Math_imul = global.Math.imul; var Math_fround = global.Math.fround; + var Math_abs = global.Math.abs; var f64_to_int = env.f64_to_int; var f64_rem = env.f64_rem; function big_negative() { |