| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Check scratch register is valid, extra and extra2 are unused. | 99 // Check scratch register is valid, extra and extra2 are unused. |
| 100 DCHECK(!scratch.is(no_reg)); | 100 DCHECK(!scratch.is(no_reg)); |
| 101 DCHECK(extra2.is(no_reg)); | 101 DCHECK(extra2.is(no_reg)); |
| 102 DCHECK(extra3.is(no_reg)); | 102 DCHECK(extra3.is(no_reg)); |
| 103 | 103 |
| 104 #ifdef DEBUG | 104 #ifdef DEBUG |
| 105 // If vector-based ics are in use, ensure that scratch doesn't conflict with | 105 // If vector-based ics are in use, ensure that scratch doesn't conflict with |
| 106 // the vector and slot registers, which need to be preserved for a handler | 106 // the vector and slot registers, which need to be preserved for a handler |
| 107 // call or miss. | 107 // call or miss. |
| 108 if (IC::ICUseVector(ic_kind)) { | 108 if (IC::ICUseVector(ic_kind)) { |
| 109 if (ic_kind == Code::LOAD_IC || ic_kind == Code::KEYED_LOAD_IC) { | 109 if (ic_kind == Code::LOAD_IC || ic_kind == Code::LOAD_GLOBAL_IC || |
| 110 ic_kind == Code::KEYED_LOAD_IC) { |
| 110 Register vector = LoadWithVectorDescriptor::VectorRegister(); | 111 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
| 111 Register slot = LoadDescriptor::SlotRegister(); | 112 Register slot = LoadDescriptor::SlotRegister(); |
| 112 DCHECK(!AreAliased(vector, slot, scratch)); | 113 DCHECK(!AreAliased(vector, slot, scratch)); |
| 113 } else { | 114 } else { |
| 114 DCHECK(ic_kind == Code::STORE_IC || ic_kind == Code::KEYED_STORE_IC); | 115 DCHECK(ic_kind == Code::STORE_IC || ic_kind == Code::KEYED_STORE_IC); |
| 115 Register vector = VectorStoreICDescriptor::VectorRegister(); | 116 Register vector = VectorStoreICDescriptor::VectorRegister(); |
| 116 Register slot = VectorStoreICDescriptor::SlotRegister(); | 117 Register slot = VectorStoreICDescriptor::SlotRegister(); |
| 117 DCHECK(!AreAliased(vector, slot, scratch)); | 118 DCHECK(!AreAliased(vector, slot, scratch)); |
| 118 } | 119 } |
| 119 } | 120 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 __ bind(&miss); | 155 __ bind(&miss); |
| 155 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); | 156 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); |
| 156 } | 157 } |
| 157 | 158 |
| 158 | 159 |
| 159 #undef __ | 160 #undef __ |
| 160 } // namespace internal | 161 } // namespace internal |
| 161 } // namespace v8 | 162 } // namespace v8 |
| 162 | 163 |
| 163 #endif // V8_TARGET_ARCH_X64 | 164 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |