Index: src/ia32/codegen-ia32.cc |
=================================================================== |
--- src/ia32/codegen-ia32.cc (revision 4871) |
+++ src/ia32/codegen-ia32.cc (working copy) |
@@ -10293,15 +10293,15 @@ |
// ST[0] == double value |
// ebx = low 32 bits of double value |
// edx = high 32 bits of double value |
- // Compute hash: |
+ // Compute hash (the shifts are arithmetic): |
// h = (low ^ high); h ^= h >> 16; h ^= h >> 8; h = h & (cacheSize - 1); |
__ mov(ecx, ebx); |
__ xor_(ecx, Operand(edx)); |
__ mov(eax, ecx); |
- __ shr(eax, 16); |
+ __ sar(eax, 16); |
__ xor_(ecx, Operand(eax)); |
__ mov(eax, ecx); |
- __ shr(eax, 8); |
+ __ sar(eax, 8); |
__ xor_(ecx, Operand(eax)); |
ASSERT(IsPowerOf2(TranscendentalCache::kCacheSize)); |
__ and_(Operand(ecx), Immediate(TranscendentalCache::kCacheSize - 1)); |