aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-14 16:17:56 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-14 16:33:12 -0700
commit84c58ecc4abb7af1c88cce1af3d86ffa106f22d2 (patch)
treea7cdcf905b7a3bfa5105fe761fbc8370fa8a43de /src/library.js
parentcb52c13b00f65b8955f812448db15058e4303295 (diff)
use compiled compiler-rt code for i64 multiplication
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/library.js b/src/library.js
index c9f161f2..11f30a1c 100644
--- a/src/library.js
+++ b/src/library.js
@@ -5304,9 +5304,11 @@ LibraryManager.library = {
llvm_umul_with_overflow_i64__deps: [function() { Types.preciseI64MathUsed = 1 }],
llvm_umul_with_overflow_i64: function(xl, xh, yl, yh) {
- i64Math.multiply(xl, xh, yl, yh);
- {{{ makeStructuralReturn([makeGetTempDouble(0, 'i32'), makeGetTempDouble(1, 'i32'), '0']) }}};
- // XXX Need to hack support for second param in long.js
+#if ASSERTIONS
+ Runtime.warnOnce('no overflow support in llvm_umul_with_overflow_i64');
+#endif
+ var low = ___muldi3(xl, xh, yl, yh);
+ {{{ makeStructuralReturn(['low', 'tempRet0', '0']) }}};
},
llvm_stacksave: function() {