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

Unified Diff: src/ia32/virtual-frame-ia32.cc

Issue 573009: Change LoadIC interface on ia32 to take arguments in registers. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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/ia32/virtual-frame-ia32.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/virtual-frame-ia32.cc
===================================================================
--- src/ia32/virtual-frame-ia32.cc (revision 3838)
+++ src/ia32/virtual-frame-ia32.cc (working copy)
@@ -888,13 +888,28 @@
Result VirtualFrame::CallLoadIC(RelocInfo::Mode mode) {
// Name and receiver are on the top of the frame. The IC expects
- // name in ecx and receiver on the stack. It does not drop the
- // receiver.
+ // name in ecx and receiver in eax.
Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
Result name = Pop();
- PrepareForCall(1, 0); // One stack arg, not callee-dropped.
- name.ToRegister(ecx);
+ Result receiver = Pop();
+ PrepareForCall(0, 0); // No stack arguments.
+ // Move results to the right registers:
+ if (name.is_register() && name.reg().is(eax)) {
+ if (receiver.is_register() && receiver.reg().is(ecx)) {
+ // Wrong registers.
+ __ xchg(eax, ecx);
+ } else {
+ // Register ecx is free for name, which frees eax for receiver.
+ name.ToRegister(ecx);
+ receiver.ToRegister(eax);
+ }
+ } else {
+ // Register eax is free for receiver, which frees ecx for name.
+ receiver.ToRegister(eax);
+ name.ToRegister(ecx);
+ }
name.Unuse();
+ receiver.Unuse();
return RawCallCodeObject(ic, mode);
}
« no previous file with comments | « src/ia32/virtual-frame-ia32.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698