Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Side by Side Diff: src/ic/x87/stub-cache-x87.cc

Issue 2147043002: Cleanup interface descriptors to reflect that vectors are part of stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rename-store-ic
Patch Set: fix Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_X87 5 #if V8_TARGET_ARCH_X87
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 __ jmp(&miss); 57 __ jmp(&miss);
58 } else if (FLAG_test_primary_stub_cache && table == StubCache::kSecondary) { 58 } else if (FLAG_test_primary_stub_cache && table == StubCache::kSecondary) {
59 __ jmp(&miss); 59 __ jmp(&miss);
60 } 60 }
61 #endif 61 #endif
62 62
63 // The vector and slot were pushed onto the stack before starting the 63 // The vector and slot were pushed onto the stack before starting the
64 // probe, and need to be dropped before calling the handler. 64 // probe, and need to be dropped before calling the handler.
65 if (is_vector_store) { 65 if (is_vector_store) {
66 // The overlap here is rather embarrassing. One does what one must. 66 // The overlap here is rather embarrassing. One does what one must.
67 Register vector = VectorStoreICDescriptor::VectorRegister(); 67 Register vector = StoreWithVectorDescriptor::VectorRegister();
68 DCHECK(extra.is(VectorStoreICDescriptor::SlotRegister())); 68 DCHECK(extra.is(StoreWithVectorDescriptor::SlotRegister()));
69 __ add(extra, Immediate(Code::kHeaderSize - kHeapObjectTag)); 69 __ add(extra, Immediate(Code::kHeaderSize - kHeapObjectTag));
70 __ pop(vector); 70 __ pop(vector);
71 __ mov(Operand::StaticVariable(virtual_register), extra); 71 __ mov(Operand::StaticVariable(virtual_register), extra);
72 __ pop(extra); // Pop "slot". 72 __ pop(extra); // Pop "slot".
73 // Jump to the first instruction in the code stub. 73 // Jump to the first instruction in the code stub.
74 __ jmp(Operand::StaticVariable(virtual_register)); 74 __ jmp(Operand::StaticVariable(virtual_register));
75 } else { 75 } else {
76 __ pop(LoadWithVectorDescriptor::VectorRegister()); 76 __ pop(LoadWithVectorDescriptor::VectorRegister());
77 __ pop(LoadDescriptor::SlotRegister()); 77 __ pop(LoadDescriptor::SlotRegister());
78 __ add(extra, Immediate(Code::kHeaderSize - kHeapObjectTag)); 78 __ add(extra, Immediate(Code::kHeaderSize - kHeapObjectTag));
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #endif 116 #endif
117 117
118 // Restore offset and re-load code entry from cache. 118 // Restore offset and re-load code entry from cache.
119 __ pop(offset); 119 __ pop(offset);
120 __ mov(offset, Operand::StaticArray(offset, times_1, value_offset)); 120 __ mov(offset, Operand::StaticArray(offset, times_1, value_offset));
121 121
122 // Jump to the first instruction in the code stub. 122 // Jump to the first instruction in the code stub.
123 if (is_vector_store) { 123 if (is_vector_store) {
124 // The vector and slot were pushed onto the stack before starting the 124 // The vector and slot were pushed onto the stack before starting the
125 // probe, and need to be dropped before calling the handler. 125 // probe, and need to be dropped before calling the handler.
126 Register vector = VectorStoreICDescriptor::VectorRegister(); 126 Register vector = StoreWithVectorDescriptor::VectorRegister();
127 DCHECK(offset.is(VectorStoreICDescriptor::SlotRegister())); 127 DCHECK(offset.is(StoreWithVectorDescriptor::SlotRegister()));
128 __ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag)); 128 __ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag));
129 __ mov(Operand::StaticVariable(virtual_register), offset); 129 __ mov(Operand::StaticVariable(virtual_register), offset);
130 __ pop(vector); 130 __ pop(vector);
131 __ pop(offset); // Pop "slot". 131 __ pop(offset); // Pop "slot".
132 __ jmp(Operand::StaticVariable(virtual_register)); 132 __ jmp(Operand::StaticVariable(virtual_register));
133 } else { 133 } else {
134 __ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag)); 134 __ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag));
135 __ jmp(offset); 135 __ jmp(offset);
136 } 136 }
137 137
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 __ bind(&miss); 207 __ bind(&miss);
208 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); 208 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1);
209 } 209 }
210 210
211 211
212 #undef __ 212 #undef __
213 } // namespace internal 213 } // namespace internal
214 } // namespace v8 214 } // namespace v8
215 215
216 #endif // V8_TARGET_ARCH_X87 216 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/ic/x87/ic-x87.cc ('k') | src/interface-descriptors.h » ('j') | src/interface-descriptors.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698