| 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 8286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8297 Heap::kHeapNumberMapRootIndex, | 8297 Heap::kHeapNumberMapRootIndex, |
| 8298 &runtime_call, | 8298 &runtime_call, |
| 8299 true); | 8299 true); |
| 8300 // Input is a HeapNumber. Load it to a double register and store the | 8300 // Input is a HeapNumber. Load it to a double register and store the |
| 8301 // low and high words into r2, r3. | 8301 // low and high words into r2, r3. |
| 8302 __ Ldrd(r2, r3, FieldMemOperand(r0, HeapNumber::kValueOffset)); | 8302 __ Ldrd(r2, r3, FieldMemOperand(r0, HeapNumber::kValueOffset)); |
| 8303 | 8303 |
| 8304 __ bind(&loaded); | 8304 __ bind(&loaded); |
| 8305 // r2 = low 32 bits of double value | 8305 // r2 = low 32 bits of double value |
| 8306 // r3 = high 32 bits of double value | 8306 // r3 = high 32 bits of double value |
| 8307 // Compute hash: | 8307 // Compute hash (the shifts are arithmetic): |
| 8308 // h = (low ^ high); h ^= h >> 16; h ^= h >> 8; h = h & (cacheSize - 1); | 8308 // h = (low ^ high); h ^= h >> 16; h ^= h >> 8; h = h & (cacheSize - 1); |
| 8309 __ eor(r1, r2, Operand(r3)); | 8309 __ eor(r1, r2, Operand(r3)); |
| 8310 __ eor(r1, r1, Operand(r1, LSR, 16)); | 8310 __ eor(r1, r1, Operand(r1, ASR, 16)); |
| 8311 __ eor(r1, r1, Operand(r1, LSR, 8)); | 8311 __ eor(r1, r1, Operand(r1, ASR, 8)); |
| 8312 ASSERT(IsPowerOf2(TranscendentalCache::kCacheSize)); | 8312 ASSERT(IsPowerOf2(TranscendentalCache::kCacheSize)); |
| 8313 __ And(r1, r1, Operand(TranscendentalCache::kCacheSize - 1)); | 8313 __ And(r1, r1, Operand(TranscendentalCache::kCacheSize - 1)); |
| 8314 | 8314 |
| 8315 // r2 = low 32 bits of double value. | 8315 // r2 = low 32 bits of double value. |
| 8316 // r3 = high 32 bits of double value. | 8316 // r3 = high 32 bits of double value. |
| 8317 // r1 = TranscendentalCache::hash(double value). | 8317 // r1 = TranscendentalCache::hash(double value). |
| 8318 __ mov(r0, | 8318 __ mov(r0, |
| 8319 Operand(ExternalReference::transcendental_cache_array_address())); | 8319 Operand(ExternalReference::transcendental_cache_array_address())); |
| 8320 // r0 points to cache array. | 8320 // r0 points to cache array. |
| 8321 __ ldr(r0, MemOperand(r0, type_ * sizeof(TranscendentalCache::caches_[0]))); | 8321 __ ldr(r0, MemOperand(r0, type_ * sizeof(TranscendentalCache::caches_[0]))); |
| (...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10668 __ bind(&string_add_runtime); | 10668 __ bind(&string_add_runtime); |
| 10669 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); | 10669 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); |
| 10670 } | 10670 } |
| 10671 | 10671 |
| 10672 | 10672 |
| 10673 #undef __ | 10673 #undef __ |
| 10674 | 10674 |
| 10675 } } // namespace v8::internal | 10675 } } // namespace v8::internal |
| 10676 | 10676 |
| 10677 #endif // V8_TARGET_ARCH_ARM | 10677 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |