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 c1f7c9ad314d634f0be45fc457f79f4ff91a2e01..cb560f12d7840b4db5e5ecd3c513dd577390053a 100644 |
--- a/src/ic/ia32/stub-cache-ia32.cc |
+++ b/src/ic/ia32/stub-cache-ia32.cc |
@@ -7,7 +7,9 @@ |
#if V8_TARGET_ARCH_IA32 |
#include "src/codegen.h" |
+#include "src/ic/ic.h" |
#include "src/ic/stub-cache.h" |
+#include "src/interface-descriptors.h" |
namespace v8 { |
namespace internal { |
@@ -16,7 +18,7 @@ namespace internal { |
static void ProbeTable(Isolate* isolate, MacroAssembler* masm, |
- Code::Flags flags, bool leave_frame, |
+ Code::Kind ic_kind, Code::Flags flags, bool leave_frame, |
StubCache::Table table, Register name, Register receiver, |
// Number of the cache entry pointer-size scaled. |
Register offset, Register extra) { |
@@ -56,6 +58,13 @@ 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. |
+ __ pop(VectorLoadICDescriptor::VectorRegister()); |
+ __ pop(VectorLoadICDescriptor::SlotRegister()); |
+ } |
+ |
if (leave_frame) __ leave(); |
// Jump to the first instruction in the code stub. |
@@ -100,6 +109,17 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm, |
__ pop(offset); |
__ mov(offset, Operand::StaticArray(offset, times_1, value_offset)); |
+ 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. |
+ Register vector = VectorLoadICDescriptor::VectorRegister(); |
+ Register slot = VectorLoadICDescriptor::SlotRegister(); |
+ DCHECK(!offset.is(vector) && !offset.is(slot)); |
+ |
+ __ pop(vector); |
+ __ pop(slot); |
+ } |
+ |
if (leave_frame) __ leave(); |
// Jump to the first instruction in the code stub. |
@@ -113,10 +133,11 @@ static void ProbeTable(Isolate* isolate, MacroAssembler* masm, |
} |
-void StubCache::GenerateProbe(MacroAssembler* masm, Code::Flags flags, |
- bool leave_frame, Register receiver, |
- Register name, Register scratch, Register extra, |
- Register extra2, Register extra3) { |
+void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind, |
+ Code::Flags flags, bool leave_frame, |
+ Register receiver, Register name, |
+ Register scratch, Register extra, Register extra2, |
+ Register extra3) { |
Label miss; |
// Assert that code is valid. The multiplying code relies on the entry size |
@@ -159,8 +180,8 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Flags flags, |
DCHECK(kCacheIndexShift == kPointerSizeLog2); |
// Probe the primary table. |
- ProbeTable(isolate(), masm, flags, leave_frame, kPrimary, name, receiver, |
- offset, extra); |
+ ProbeTable(isolate(), masm, ic_kind, flags, leave_frame, kPrimary, name, |
+ receiver, offset, extra); |
// Primary miss: Compute hash for secondary probe. |
__ mov(offset, FieldOperand(name, Name::kHashFieldOffset)); |
@@ -172,8 +193,8 @@ void StubCache::GenerateProbe(MacroAssembler* masm, Code::Flags flags, |
__ and_(offset, (kSecondaryTableSize - 1) << kCacheIndexShift); |
// Probe the secondary table. |
- ProbeTable(isolate(), masm, flags, leave_frame, kSecondary, name, receiver, |
- offset, extra); |
+ ProbeTable(isolate(), masm, ic_kind, flags, leave_frame, kSecondary, name, |
+ receiver, offset, extra); |
// Cache miss: Fall-through and let caller handle the miss by |
// entering the runtime system. |