aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Guryanov <caiiiycuk@gmail.com>2012-07-09 21:26:48 +0700
committerAleksander Guryanov <caiiiycuk@gmail.com>2012-07-09 21:26:48 +0700
commite875fb7d1774b8d04818882859f9e2a3efb53ad5 (patch)
tree6a78da811b1d62e9892fc6e33ebed4c68e035c05
parentfaebd713187b473fa7090c15169618a7af5cbcc8 (diff)
Add llvm_uadd_with_overflow_i8 function
-rw-r--r--src/library.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index b9c13055..679cdd6d 100644
--- a/src/library.js
+++ b/src/library.js
@@ -4771,6 +4771,15 @@ LibraryManager.library = {
// type_info for void*.
_ZTIPv: [0],
+ llvm_uadd_with_overflow_i8: function(x, y) {
+ x = (x>>>0) & 0xff;
+ y = (y>>>0) & 0xff;
+ return {
+ f0: (x+y) & 0xff,
+ f1: x+y > 255
+ };
+ },
+
llvm_uadd_with_overflow_i16: function(x, y) {
x = (x>>>0) & 0xffff;
y = (y>>>0) & 0xffff;