| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 10272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10283 | 10283 |
| 10284 __ bind(&loaded); | 10284 __ bind(&loaded); |
| 10285 // ST[0] == double value | 10285 // ST[0] == double value |
| 10286 // ebx = low 32 bits of double value | 10286 // ebx = low 32 bits of double value |
| 10287 // edx = high 32 bits of double value | 10287 // edx = high 32 bits of double value |
| 10288 // Compute hash: | 10288 // Compute hash: |
| 10289 // h = (low ^ high); h ^= h >> 16; h ^= h >> 8; h = h & (cacheSize - 1); | 10289 // h = (low ^ high); h ^= h >> 16; h ^= h >> 8; h = h & (cacheSize - 1); |
| 10290 __ mov(ecx, ebx); | 10290 __ mov(ecx, ebx); |
| 10291 __ xor_(ecx, Operand(edx)); | 10291 __ xor_(ecx, Operand(edx)); |
| 10292 __ mov(eax, ecx); | 10292 __ mov(eax, ecx); |
| 10293 __ sar(eax, 16); | 10293 __ shr(eax, 16); |
| 10294 __ xor_(ecx, Operand(eax)); | 10294 __ xor_(ecx, Operand(eax)); |
| 10295 __ mov(eax, ecx); | 10295 __ mov(eax, ecx); |
| 10296 __ sar(eax, 8); | 10296 __ shr(eax, 8); |
| 10297 __ xor_(ecx, Operand(eax)); | 10297 __ xor_(ecx, Operand(eax)); |
| 10298 ASSERT(IsPowerOf2(TranscendentalCache::kCacheSize)); | 10298 ASSERT(IsPowerOf2(TranscendentalCache::kCacheSize)); |
| 10299 __ and_(Operand(ecx), Immediate(TranscendentalCache::kCacheSize - 1)); | 10299 __ and_(Operand(ecx), Immediate(TranscendentalCache::kCacheSize - 1)); |
| 10300 |
| 10300 // ST[0] == double value. | 10301 // ST[0] == double value. |
| 10301 // ebx = low 32 bits of double value. | 10302 // ebx = low 32 bits of double value. |
| 10302 // edx = high 32 bits of double value. | 10303 // edx = high 32 bits of double value. |
| 10303 // ecx = TranscendentalCache::hash(double value). | 10304 // ecx = TranscendentalCache::hash(double value). |
| 10304 __ mov(eax, | 10305 __ mov(eax, |
| 10305 Immediate(ExternalReference::transcendental_cache_array_address())); | 10306 Immediate(ExternalReference::transcendental_cache_array_address())); |
| 10306 // Eax points to cache array. | 10307 // Eax points to cache array. |
| 10307 __ mov(eax, Operand(eax, type_ * sizeof(TranscendentalCache::caches_[0]))); | 10308 __ mov(eax, Operand(eax, type_ * sizeof(TranscendentalCache::caches_[0]))); |
| 10308 // Eax points to the cache for the type type_. | 10309 // Eax points to the cache for the type type_. |
| 10309 // If NULL, the cache hasn't been initialized yet, so go through runtime. | 10310 // If NULL, the cache hasn't been initialized yet, so go through runtime. |
| (...skipping 3390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13700 masm.GetCode(&desc); | 13701 masm.GetCode(&desc); |
| 13701 // Call the function from C++. | 13702 // Call the function from C++. |
| 13702 return FUNCTION_CAST<MemCopyFunction>(buffer); | 13703 return FUNCTION_CAST<MemCopyFunction>(buffer); |
| 13703 } | 13704 } |
| 13704 | 13705 |
| 13705 #undef __ | 13706 #undef __ |
| 13706 | 13707 |
| 13707 } } // namespace v8::internal | 13708 } } // namespace v8::internal |
| 13708 | 13709 |
| 13709 #endif // V8_TARGET_ARCH_IA32 | 13710 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |