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

Unified Diff: src/jump-target-ia32.cc

Issue 17412: Experimental: a quick hack to allow different live values to flow down... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 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/codegen-ia32.cc ('k') | src/register-allocator-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jump-target-ia32.cc
===================================================================
--- src/jump-target-ia32.cc (revision 1041)
+++ src/jump-target-ia32.cc (working copy)
@@ -72,7 +72,8 @@
current_frame->MakeMergable();
expected_frame_ = current_frame;
ASSERT(cgen_->HasValidEntryRegisters());
- cgen_->SetFrame(NULL);
+ RegisterFile ignored;
+ cgen_->SetFrame(NULL, &ignored);
} else {
current_frame->MergeTo(expected_frame_);
ASSERT(cgen_->HasValidEntryRegisters());
@@ -102,7 +103,6 @@
VirtualFrame* current_frame = cgen_->frame();
ASSERT(current_frame != NULL);
- ASSERT(cgen_->HasValidEntryRegisters());
if (expected_frame_ == NULL) {
expected_frame_ = new VirtualFrame(current_frame);
@@ -132,11 +132,22 @@
Label original_fall_through;
__ j(NegateCondition(cc), &original_fall_through, NegateHint(hint));
VirtualFrame* working_frame = new VirtualFrame(current_frame);
- cgen_->SetFrame(working_frame);
+
+ // Switch to the working frame for the merge code with only the reserved
+ // registers referenced outside the frame. Explicitly setting
+ // references here is ugly, but temporary.
+ RegisterFile non_frame_registers;
+ non_frame_registers.Use(esi);
+ non_frame_registers.Use(ebp);
+ non_frame_registers.Use(esp);
+ cgen_->SetFrame(working_frame, &non_frame_registers);
+
working_frame->MergeTo(expected_frame_);
ASSERT(cgen_->HasValidEntryRegisters());
__ jmp(&label_);
- cgen_->SetFrame(current_frame);
+
+ // Restore the current frame and its associated non-frame registers.
+ cgen_->SetFrame(current_frame, &non_frame_registers);
delete working_frame;
__ bind(&original_fall_through);
}
@@ -234,7 +245,14 @@
ASSERT(cgen_->HasValidEntryRegisters());
expected_frame_ = new VirtualFrame(current_frame);
} else if (current_frame == NULL) {
- cgen_->SetFrame(new VirtualFrame(expected_frame_));
+ // Pick up the frame from the label. No merge code is necessary.
+ // Manually setting the reserved register reference counts is clumsy but
+ // temporary.
+ RegisterFile non_frame_registers;
+ non_frame_registers.Use(esi);
+ non_frame_registers.Use(ebp);
+ non_frame_registers.Use(esp);
+ cgen_->SetFrame(new VirtualFrame(expected_frame_), &non_frame_registers);
ASSERT(cgen_->HasValidEntryRegisters());
} else {
ASSERT(cgen_->HasValidEntryRegisters());
« no previous file with comments | « src/codegen-ia32.cc ('k') | src/register-allocator-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698