author | Martin Soch <Martin.Soch@oracle.com> |
Mon, 14 Jan 2013 09:47:38 +0100 | |
branch | arithmetic |
changeset 440 | aa50464da62d |
parent 439 | e4fb6c7ac42a |
child 445 | 9e4f01dd6acb |
permissions | -rw-r--r-- |
1 // empty line needed here
2 __add32 = function(x,y) { return (x + y) | 0; };
3 __sub32 = function(x,y) { return (x - y) | 0; };
4 __mul32 = function(x,y) {
5 return (((x * (y >> 16)) << 16) + x * (y & 0xFFFF)) | 0;
6 };
8 __toInt8 = function(x) { return (x << 24) >> 24; };
9 __toInt16 = function(x) { return (x << 16) >> 16; };