aboutsummaryrefslogtreecommitdiff
path: root/src/analyzer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-01 15:54:16 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-07 14:23:22 -0800
commitc507a8cf49469b37814864ddc446feb88383dd5d (patch)
tree9891a3961c0cd11172f5557da415268a4e9709e0 /src/analyzer.js
parent74c843c55f0238bd75a919fdd5b2dc2f57f48fe2 (diff)
64-bit dynamic shifts in asm
Diffstat (limited to 'src/analyzer.js')
-rw-r--r--src/analyzer.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index 014579f4..6a1eb2f6 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -554,9 +554,10 @@ function analyzer(data, sidePass) {
// We can't statically legalize this, do the operation at runtime TODO: optimize
assert(sourceBits == 64, 'TODO: handle nonconstant shifts on != 64 bits');
value.intertype = 'value';
- value.ident = 'Runtime.bitshift64(' + sourceElements[0].ident + ', ' +
+ value.ident = 'Runtime' + (ASM_JS ? '_' : '.') + 'bitshift64(' + sourceElements[0].ident + ', ' +
sourceElements[1].ident + ',"' + value.op + '",' + value.params[1].ident + '$0);' +
- 'var ' + value.assignTo + '$0 = ' + value.assignTo + '[0], ' + value.assignTo + '$1 = ' + value.assignTo + '[1];';
+ 'var ' + value.assignTo + '$0 = ' + makeGetTempDouble(0) + ', ' + value.assignTo + '$1 = ' + makeGetTempDouble(1) + ';';
+ value.assignTo = null;
i++;
continue;
}