aboutsummaryrefslogtreecommitdiff
path: root/tools/eliminator/asm-eliminator-test-output.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-01 19:21:39 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-07 14:23:22 -0800
commit61a8933a8df57a9bca285f8b14ab68fdf9da2c19 (patch)
tree971dccbbff37ba3d577f4353a1c0a4a2424c218a /tools/eliminator/asm-eliminator-test-output.js
parente228b6fff29ff3448be4489356ee1c62be1a252b (diff)
add asmEliminator testcase
Diffstat (limited to 'tools/eliminator/asm-eliminator-test-output.js')
-rw-r--r--tools/eliminator/asm-eliminator-test-output.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/eliminator/asm-eliminator-test-output.js b/tools/eliminator/asm-eliminator-test-output.js
index 228915d4..6b15a0cb 100644
--- a/tools/eliminator/asm-eliminator-test-output.js
+++ b/tools/eliminator/asm-eliminator-test-output.js
@@ -5,4 +5,23 @@ function asm(x, y) {
a = cheez(y + ~~x | 0) | 0;
fleefl(a * a | 0, a | 0);
}
+function __Z11printResultPiS_j($needle, $haystack, $len) {
+ $needle = $needle | 0;
+ $haystack = $haystack | 0;
+ $len = $len | 0;
+ var $3 = 0;
+ var __stackBase__ = STACKTOP;
+ $3 = _bsearch($needle, $haystack, $len, 4, 2);
+ if (($3 | 0) == 0) {
+ $puts = _puts(_str | 0);
+ STACKTOP = __stackBase__;
+ return;
+ } else {
+ $7 = $3;
+ $8 = HEAP32[($7 & 16777215) >> 2] | 0;
+ $9 = _printf(__str1 | 0, (tempInt = STACKTOP, STACKTOP = STACKTOP + 4 | 0, HEAP32[(tempInt & 16777215) >> 2] = $8, tempInt));
+ STACKTOP = __stackBase__;
+ return;
+ }
+}