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 8171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8182 // h = h0 = bits ^ (bits >> 32); | 8182 // h = h0 = bits ^ (bits >> 32); |
8183 // h ^= h >> 16; | 8183 // h ^= h >> 16; |
8184 // h ^= h >> 8; | 8184 // h ^= h >> 8; |
8185 // h = h & (cacheSize - 1); | 8185 // h = h & (cacheSize - 1); |
8186 // or h = (h0 ^ (h0 >> 8) ^ (h0 >> 16) ^ (h0 >> 24)) & (cacheSize - 1) | 8186 // or h = (h0 ^ (h0 >> 8) ^ (h0 >> 16) ^ (h0 >> 24)) & (cacheSize - 1) |
8187 __ sar(rdx, Immediate(32)); | 8187 __ sar(rdx, Immediate(32)); |
8188 __ xorl(rdx, rbx); | 8188 __ xorl(rdx, rbx); |
8189 __ movl(rcx, rdx); | 8189 __ movl(rcx, rdx); |
8190 __ movl(rax, rdx); | 8190 __ movl(rax, rdx); |
8191 __ movl(rdi, rdx); | 8191 __ movl(rdi, rdx); |
8192 __ sarl(rdx, Immediate(8)); | 8192 __ shrl(rdx, Immediate(8)); |
8193 __ sarl(rcx, Immediate(16)); | 8193 __ shrl(rcx, Immediate(16)); |
8194 __ sarl(rax, Immediate(24)); | 8194 __ shrl(rax, Immediate(24)); |
8195 __ xorl(rcx, rdx); | 8195 __ xorl(rcx, rdx); |
8196 __ xorl(rax, rdi); | 8196 __ xorl(rax, rdi); |
8197 __ xorl(rcx, rax); | 8197 __ xorl(rcx, rax); |
8198 ASSERT(IsPowerOf2(TranscendentalCache::kCacheSize)); | 8198 ASSERT(IsPowerOf2(TranscendentalCache::kCacheSize)); |
8199 __ andl(rcx, Immediate(TranscendentalCache::kCacheSize - 1)); | 8199 __ andl(rcx, Immediate(TranscendentalCache::kCacheSize - 1)); |
| 8200 |
8200 // ST[0] == double value. | 8201 // ST[0] == double value. |
8201 // rbx = bits of double value. | 8202 // rbx = bits of double value. |
8202 // rcx = TranscendentalCache::hash(double value). | 8203 // rcx = TranscendentalCache::hash(double value). |
8203 __ movq(rax, ExternalReference::transcendental_cache_array_address()); | 8204 __ movq(rax, ExternalReference::transcendental_cache_array_address()); |
8204 // rax points to cache array. | 8205 // rax points to cache array. |
8205 __ movq(rax, Operand(rax, type_ * sizeof(TranscendentalCache::caches_[0]))); | 8206 __ movq(rax, Operand(rax, type_ * sizeof(TranscendentalCache::caches_[0]))); |
8206 // rax points to the cache for the type type_. | 8207 // rax points to the cache for the type type_. |
8207 // If NULL, the cache hasn't been initialized yet, so go through runtime. | 8208 // If NULL, the cache hasn't been initialized yet, so go through runtime. |
8208 __ testq(rax, rax); | 8209 __ testq(rax, rax); |
8209 __ j(zero, &runtime_call_clear_stack); | 8210 __ j(zero, &runtime_call_clear_stack); |
(...skipping 3735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11945 } | 11946 } |
11946 | 11947 |
11947 #endif | 11948 #endif |
11948 | 11949 |
11949 | 11950 |
11950 #undef __ | 11951 #undef __ |
11951 | 11952 |
11952 } } // namespace v8::internal | 11953 } } // namespace v8::internal |
11953 | 11954 |
11954 #endif // V8_TARGET_ARCH_X64 | 11955 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |