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

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

Issue 1604002: Simple register allocation for ARM. Only top of expression... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 8 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
Index: src/virtual-frame-heavy.cc
===================================================================
--- src/virtual-frame-heavy.cc (revision 4341)
+++ src/virtual-frame-heavy.cc (working copy)
@@ -295,4 +295,18 @@
}
+// If there are any registers referenced only by the frame, spill one.
+Register VirtualFrame::SpillAnyRegister() {
+ // Find the leftmost (ordered by register number) register whose only
+ // reference is in the frame.
+ for (int i = 0; i < RegisterAllocator::kNumRegisters; i++) {
+ if (is_used(i) && cgen()->allocator()->count(i) == 1) {
+ SpillElementAt(register_location(i));
+ ASSERT(!cgen()->allocator()->is_used(i));
+ return RegisterAllocator::ToRegister(i);
+ }
+ }
+ return no_reg;
+}
+
} } // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698