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

Unified Diff: src/ic/ppc/stub-cache-ppc.cc

Issue 2123983004: [ic] Split megamorphic stub cache in two caches (for loads and for stores). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@flags-fix
Patch Set: Rebasing 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 side-by-side diff with in-line comments
Download patch
Index: src/ic/ppc/stub-cache-ppc.cc
diff --git a/src/ic/ppc/stub-cache-ppc.cc b/src/ic/ppc/stub-cache-ppc.cc
index 45a620ccfcd3466db069478e8e069b311a5e59b3..1fff0a2fa89574755c743c490b26aecd48016247 100644
--- a/src/ic/ppc/stub-cache-ppc.cc
+++ b/src/ic/ppc/stub-cache-ppc.cc
@@ -14,15 +14,15 @@ namespace internal {
#define __ ACCESS_MASM(masm)
-static void ProbeTable(Isolate* isolate, MacroAssembler* masm,
+static void ProbeTable(StubCache* stub_cache, MacroAssembler* masm,
Code::Flags flags, StubCache::Table table,
Register receiver, Register name,
// Number of the cache entry, not scaled.
Register offset, Register scratch, Register scratch2,
Register offset_scratch) {
- ExternalReference key_offset(isolate->stub_cache()->key_reference(table));
- ExternalReference value_offset(isolate->stub_cache()->value_reference(table));
- ExternalReference map_offset(isolate->stub_cache()->map_reference(table));
+ ExternalReference key_offset(stub_cache->key_reference(table));
+ ExternalReference value_offset(stub_cache->value_reference(table));
+ ExternalReference map_offset(stub_cache->map_reference(table));
uintptr_t key_off_addr = reinterpret_cast<uintptr_t>(key_offset.address());
uintptr_t value_off_addr =
@@ -101,12 +101,12 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm,
__ bind(&miss);
}
-
-void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind,
- Code::Flags flags, Register receiver,
+void StubCache::GenerateProbe(MacroAssembler* masm, Register receiver,
Register name, Register scratch, Register extra,
Register extra2, Register extra3) {
- Isolate* isolate = masm->isolate();
+ Code::Flags flags =
+ Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(ic_kind_));
+
Label miss;
#if V8_TARGET_ARCH_PPC64
@@ -132,12 +132,13 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind,
// If vector-based ics are in use, ensure that scratch, extra, extra2 and
// extra3 don't conflict with the vector and slot registers, which need
// to be preserved for a handler call or miss.
- if (IC::ICUseVector(ic_kind)) {
+ if (IC::ICUseVector(ic_kind_)) {
Register vector, slot;
- if (ic_kind == Code::STORE_IC || ic_kind == Code::KEYED_STORE_IC) {
+ if (ic_kind_ == Code::STORE_IC || ic_kind_ == Code::KEYED_STORE_IC) {
vector = VectorStoreICDescriptor::VectorRegister();
slot = VectorStoreICDescriptor::SlotRegister();
} else {
+ DCHECK(ic_kind_ == Code::LOAD_IC || ic_kind_ == Code::KEYED_LOAD_IC);
vector = LoadWithVectorDescriptor::VectorRegister();
slot = LoadWithVectorDescriptor::SlotRegister();
}
@@ -162,7 +163,7 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind,
Operand((kPrimaryTableSize - 1) << kCacheIndexShift));
// Probe the primary table.
- ProbeTable(isolate, masm, flags, kPrimary, receiver, name, scratch, extra,
+ ProbeTable(this, masm, flags, kPrimary, receiver, name, scratch, extra,
extra2, extra3);
// Primary miss: Compute hash for secondary probe.
@@ -172,7 +173,7 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind,
Operand((kSecondaryTableSize - 1) << kCacheIndexShift));
// Probe the secondary table.
- ProbeTable(isolate, masm, flags, kSecondary, receiver, name, scratch, extra,
+ ProbeTable(this, masm, flags, kSecondary, receiver, name, scratch, extra,
extra2, extra3);
// Cache miss: Fall-through and let caller handle the miss by
« no previous file with comments | « src/ic/ppc/ic-ppc.cc ('k') | src/ic/s390/ic-s390.cc » ('j') | src/ic/x64/stub-cache-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698