| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
| 9 #include "src/ic/stub-cache.h" | 9 #include "src/ic/stub-cache.h" |
| 10 #include "src/interface-descriptors.h" | 10 #include "src/interface-descriptors.h" |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 | 14 |
| 15 #define __ ACCESS_MASM(masm) | 15 #define __ ACCESS_MASM(masm) |
| 16 | 16 |
| 17 static void ProbeTable(StubCache* stub_cache, MacroAssembler* masm, | 17 static void ProbeTable(StubCache* stub_cache, MacroAssembler* masm, |
| 18 Code::Flags flags, StubCache::Table table, | 18 Code::Flags flags, StubCache::Table table, |
| 19 Register receiver, Register name, | 19 Register receiver, Register name, |
| 20 // Number of the cache entry, not scaled. | 20 // The offset is scaled by 4, based on |
| 21 // kCacheIndexShift, which is two bits |
| 21 Register offset, Register scratch, Register scratch2, | 22 Register offset, Register scratch, Register scratch2, |
| 22 Register offset_scratch) { | 23 Register offset_scratch) { |
| 23 ExternalReference key_offset(stub_cache->key_reference(table)); | 24 ExternalReference key_offset(stub_cache->key_reference(table)); |
| 24 ExternalReference value_offset(stub_cache->value_reference(table)); | 25 ExternalReference value_offset(stub_cache->value_reference(table)); |
| 25 ExternalReference map_offset(stub_cache->map_reference(table)); | 26 ExternalReference map_offset(stub_cache->map_reference(table)); |
| 26 | 27 |
| 27 uintptr_t key_off_addr = reinterpret_cast<uintptr_t>(key_offset.address()); | 28 uintptr_t key_off_addr = reinterpret_cast<uintptr_t>(key_offset.address()); |
| 28 uintptr_t value_off_addr = | 29 uintptr_t value_off_addr = |
| 29 reinterpret_cast<uintptr_t>(value_offset.address()); | 30 reinterpret_cast<uintptr_t>(value_offset.address()); |
| 30 uintptr_t map_off_addr = reinterpret_cast<uintptr_t>(map_offset.address()); | 31 uintptr_t map_off_addr = reinterpret_cast<uintptr_t>(map_offset.address()); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1, extra2, | 183 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1, extra2, |
| 183 extra3); | 184 extra3); |
| 184 } | 185 } |
| 185 | 186 |
| 186 | 187 |
| 187 #undef __ | 188 #undef __ |
| 188 } // namespace internal | 189 } // namespace internal |
| 189 } // namespace v8 | 190 } // namespace v8 |
| 190 | 191 |
| 191 #endif // V8_TARGET_ARCH_PPC | 192 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |