diff options
Diffstat (limited to 'test/unit.asm.js')
-rw-r--r-- | test/unit.asm.js | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index 686535077..64583da24 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -4,6 +4,8 @@ function () { var t = global.NaN, u = global.Infinity; var Int = 0; var Double = 0.0; + var Math_fround = global.Math.fround; + var Math_abs = global.Math.abs; function big_negative() { var temp = 0.0; @@ -55,10 +57,75 @@ function () { case 12: return 121; case 5: return 51; } + Lout: switch (x | 0) { + case 12: break; + case 10: break Lout; + case 5: { + while (1) { + break; + } + break; + } + case 2: { + while (1) { + break Lout; + } + break; + } + } + return 0; + } + function blocker() { + L: { + break L; + } } function frem() { return +(5.5 % 1.2); } + function big_uint_div_u() { + var x = 0; + x = (4294967295 / 2)&-1; + return x | 0; + } + function fr(x) { + x = Math_fround(x); + var y = Math_fround(0), z = 0.0; + Math_fround(z); + Math_fround(y); + Math_fround(5); + Math_fround(0); + Math_fround(5.0); + Math_fround(0.0); + } + function negZero() { + return +-0; + } + function abs() { + var x = 0, y = 0.0, z = Math_fround(0); + x = Math_abs(0) | 0; + y = +Math_abs(0.0); + z = Math_fround(Math_abs(Math_fround(0))); + } + function neg() { + var x = Math_fround(0); + x = -x; + FUNCTION_TABLE_c[1 & 7](x); + } + function cneg(x) { + x = Math_fround(x); + FUNCTION_TABLE_c[1 & 7](x); + } + function ___syscall_ret() { + var $0 = 0; + ($0>>>0) > 4294963200; // -4096 + } + function smallCompare() { + var i = 0, j = 0; + if ((i | 0) < (j | 0)) i = i + 1 | 0; + if ((i >>> 0) < (j >>> 0)) i = i + 1 | 0; + return i | 0; + } function z() { } @@ -67,6 +134,7 @@ function () { var FUNCTION_TABLE_a = [ z, big_negative, z, z ]; var FUNCTION_TABLE_b = [ w, w, importedDoubles, w ]; + var FUNCTION_TABLE_c = [ z, cneg ]; return { big_negative: big_negative }; } |