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

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

Issue 1319123004: Reland Vector ICs: platform support for vector-based stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix for arm[64] release build failure. Created 5 years, 3 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
« no previous file with comments | « src/ic/ia32/ic-ia32.cc ('k') | src/ic/mips/access-compiler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ia32/stub-cache-ia32.cc
diff --git a/src/ic/ia32/stub-cache-ia32.cc b/src/ic/ia32/stub-cache-ia32.cc
index 68b30e7bdba1305ef1084336b5f5490005937928..e5791793f5de72f3cda573bdec84486399b5b108 100644
--- a/src/ic/ia32/stub-cache-ia32.cc
+++ b/src/ic/ia32/stub-cache-ia32.cc
@@ -25,6 +25,9 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm,
ExternalReference map_offset(isolate->stub_cache()->map_reference(table));
Label miss;
+ bool is_vector_store =
+ IC::ICUseVector(ic_kind) &&
+ (ic_kind == Code::STORE_IC || ic_kind == Code::KEYED_STORE_IC);
// Multiply by 3 because there are 3 fields per entry (name, code, map).
__ lea(offset, Operand(offset, offset, times_2, 0));
@@ -56,19 +59,28 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm,
}
#endif
- if (IC::ICUseVector(ic_kind)) {
- // The vector and slot were pushed onto the stack before starting the
- // probe, and need to be dropped before calling the handler.
+ // The vector and slot were pushed onto the stack before starting the
+ // probe, and need to be dropped before calling the handler.
+ if (is_vector_store) {
+ // The overlap here is rather embarrassing. One does what one must.
+ Register vector = VectorStoreICDescriptor::VectorRegister();
+ DCHECK(extra.is(VectorStoreICDescriptor::SlotRegister()));
+ __ add(extra, Immediate(Code::kHeaderSize - kHeapObjectTag));
+ __ pop(vector);
+ __ xchg(extra, Operand(esp, 0));
+ // Jump to the first instruction in the code stub.
+ __ ret(0);
+ } else {
__ pop(LoadWithVectorDescriptor::VectorRegister());
__ pop(LoadDescriptor::SlotRegister());
+ __ add(extra, Immediate(Code::kHeaderSize - kHeapObjectTag));
+ __ jmp(extra);
}
- // Jump to the first instruction in the code stub.
- __ add(extra, Immediate(Code::kHeaderSize - kHeapObjectTag));
- __ jmp(extra);
-
__ bind(&miss);
} else {
+ DCHECK(ic_kind == Code::STORE_IC || ic_kind == Code::KEYED_STORE_IC);
+
// Save the offset on the stack.
__ push(offset);
@@ -105,21 +117,21 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm,
__ pop(offset);
__ mov(offset, Operand::StaticArray(offset, times_1, value_offset));
- if (IC::ICUseVector(ic_kind)) {
+ // Jump to the first instruction in the code stub.
+ if (is_vector_store) {
// The vector and slot were pushed onto the stack before starting the
// probe, and need to be dropped before calling the handler.
- Register vector = LoadWithVectorDescriptor::VectorRegister();
- Register slot = LoadDescriptor::SlotRegister();
- DCHECK(!offset.is(vector) && !offset.is(slot));
-
+ Register vector = VectorStoreICDescriptor::VectorRegister();
+ DCHECK(offset.is(VectorStoreICDescriptor::SlotRegister()));
+ __ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag));
__ pop(vector);
- __ pop(slot);
+ __ xchg(offset, Operand(esp, 0));
+ __ ret(0);
+ } else {
+ __ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag));
+ __ jmp(offset);
}
- // Jump to the first instruction in the code stub.
- __ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag));
- __ jmp(offset);
-
// Pop at miss.
__ bind(&miss);
__ pop(offset);
« no previous file with comments | « src/ic/ia32/ic-ia32.cc ('k') | src/ic/mips/access-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698