aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-23 17:15:12 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-23 17:15:12 -0800
commit99174613de8ac2b23bf8bce24d3dade3dfc77968 (patch)
tree76b6c61c8dc151ea19e8e1d764ad4d3a12549e42
parentc92fc2ca234fbe4fb689b6c799956537463a286b (diff)
llvm_ctlz_i64
-rw-r--r--src/library.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 93d54d68..8f2232a6 100644
--- a/src/library.js
+++ b/src/library.js
@@ -4751,6 +4751,13 @@ LibraryManager.library = {
return 32;
},
+ llvm_ctlz_i64__deps: ['llvm_ctlz_i32'],
+ llvm_ctlz_i64: function(l, h) {
+ var ret = _llvm_ctlz_i32(h);
+ if (ret == 32) ret += _llvm_ctlz_i32(l);
+ return ret;
+ },
+
llvm_trap: function() {
throw 'trap! ' + new Error().stack;
},