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 8260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8271 true); | 8271 true); |
8272 // Input is a HeapNumber. Load it to a double register and store the | 8272 // Input is a HeapNumber. Load it to a double register and store the |
8273 // low and high words into r2, r3. | 8273 // low and high words into r2, r3. |
8274 __ Ldrd(r2, r3, FieldMemOperand(r0, HeapNumber::kValueOffset)); | 8274 __ Ldrd(r2, r3, FieldMemOperand(r0, HeapNumber::kValueOffset)); |
8275 | 8275 |
8276 __ bind(&loaded); | 8276 __ bind(&loaded); |
8277 // r2 = low 32 bits of double value | 8277 // r2 = low 32 bits of double value |
8278 // r3 = high 32 bits of double value | 8278 // r3 = high 32 bits of double value |
8279 // Compute hash: | 8279 // Compute hash: |
8280 // h = (low ^ high); h ^= h >> 16; h ^= h >> 8; h = h & (cacheSize - 1); | 8280 // h = (low ^ high); h ^= h >> 16; h ^= h >> 8; h = h & (cacheSize - 1); |
8281 __ eor(r1, r2, Operand(r2)); | 8281 __ eor(r1, r2, Operand(r3)); |
8282 __ eor(r1, r1, Operand(r1, LSR, 16)); | 8282 __ eor(r1, r1, Operand(r1, LSR, 16)); |
8283 __ eor(r1, r1, Operand(r1, LSR, 8)); | 8283 __ eor(r1, r1, Operand(r1, LSR, 8)); |
8284 ASSERT(IsPowerOf2(TranscendentalCache::kCacheSize)); | 8284 ASSERT(IsPowerOf2(TranscendentalCache::kCacheSize)); |
8285 if (CpuFeatures::IsSupported(ARMv7)) { | 8285 if (CpuFeatures::IsSupported(ARMv7)) { |
8286 const int kTranscendentalCacheSizeBits = 9; | 8286 const int kTranscendentalCacheSizeBits = 9; |
8287 ASSERT_EQ(1 << kTranscendentalCacheSizeBits, | 8287 ASSERT_EQ(1 << kTranscendentalCacheSizeBits, |
8288 TranscendentalCache::kCacheSize); | 8288 TranscendentalCache::kCacheSize); |
8289 __ ubfx(r1, r1, 0, kTranscendentalCacheSizeBits); | 8289 __ ubfx(r1, r1, 0, kTranscendentalCacheSizeBits); |
8290 } else { | 8290 } else { |
8291 __ and_(r1, r1, Operand(TranscendentalCache::kCacheSize - 1)); | 8291 __ and_(r1, r1, Operand(TranscendentalCache::kCacheSize - 1)); |
(...skipping 2363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10655 __ bind(&string_add_runtime); | 10655 __ bind(&string_add_runtime); |
10656 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); | 10656 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); |
10657 } | 10657 } |
10658 | 10658 |
10659 | 10659 |
10660 #undef __ | 10660 #undef __ |
10661 | 10661 |
10662 } } // namespace v8::internal | 10662 } } // namespace v8::internal |
10663 | 10663 |
10664 #endif // V8_TARGET_ARCH_ARM | 10664 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |