X64: Activate Probes for Megamorphic StoreIC on 64-bit platform.
authorwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 27 Aug 2009 15:46:03 +0000 (15:46 +0000)
committerwhesse@chromium.org <whesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 27 Aug 2009 15:46:03 +0000 (15:46 +0000)
Review URL: http://codereview.chromium.org/174609

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/x64/ic-x64.cc

index af0842a..0062b19 100644 (file)
@@ -918,6 +918,21 @@ void StoreIC::GenerateExtendStorage(MacroAssembler* masm) {
 }
 
 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
+  // ----------- S t a t e -------------
+  //  -- rax    : value
+  //  -- rcx    : name
+  //  -- rsp[0] : return address
+  //  -- rsp[8] : receiver
+  // -----------------------------------
+
+  // Get the receiver from the stack and probe the stub cache.
+  __ movq(rdx, Operand(rsp, kPointerSize));
+  Code::Flags flags = Code::ComputeFlags(Code::STORE_IC,
+                                         NOT_IN_LOOP,
+                                         MONOMORPHIC);
+  StubCache::GenerateProbe(masm, flags, rdx, rcx, rbx, no_reg);
+
+  // Cache miss: Jump to runtime.
   Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss)));
 }