Index: src/x64/virtual-frame-x64.cc |
=================================================================== |
--- src/x64/virtual-frame-x64.cc (revision 2241) |
+++ src/x64/virtual-frame-x64.cc (working copy) |
@@ -857,8 +857,37 @@ |
} |
+Result VirtualFrame::CallStoreIC() { |
+ // Name, value, and receiver are on top of the frame. The IC |
+ // expects name in ecx, value in eax, and receiver on the stack. It |
William Hesse
2009/06/22 19:14:23
rcx, value in rax,
Mads Ager (chromium)
2009/06/22 19:25:00
Done.
|
+ // does not drop the receiver. |
+ Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); |
+ Result name = Pop(); |
+ Result value = Pop(); |
+ PrepareForCall(1, 0); // One stack arg, not callee-dropped. |
+ if (value.is_register() && value.reg().is(rcx)) { |
+ if (name.is_register() && name.reg().is(rax)) { |
+ // Wrong registers. |
+ __ xchg(rax, rcx); |
+ } else { |
+ // Register eax is free for value, which frees ecx for name. |
William Hesse
2009/06/22 19:14:23
Register rax ... rcx
Mads Ager (chromium)
2009/06/22 19:25:00
Done.
|
+ value.ToRegister(rax); |
+ name.ToRegister(rcx); |
+ } |
+ } else { |
+ // Register ecx is free for name, which guarantees eax is free for |
William Hesse
2009/06/22 19:14:23
rcx ... rax
Mads Ager (chromium)
2009/06/22 19:25:00
Done.
|
+ // value. |
+ name.ToRegister(rcx); |
+ value.ToRegister(rax); |
+ } |
+ name.Unuse(); |
+ value.Unuse(); |
+ return RawCallCodeObject(ic, RelocInfo::CODE_TARGET); |
+} |
+ |
+ |
#undef __ |
} } // namespace v8::internal |