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

Unified Diff: src/x64/register-allocator-x64-inl.h

Issue 123018: X64 implementation starts using virtual frame and register allocators. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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/x64/register-allocator-x64.h ('k') | src/x64/virtual-frame-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/register-allocator-x64-inl.h
===================================================================
--- src/x64/register-allocator-x64-inl.h (revision 2145)
+++ src/x64/register-allocator-x64-inl.h (working copy)
@@ -37,8 +37,7 @@
// RegisterAllocator implementation.
bool RegisterAllocator::IsReserved(Register reg) {
- // All registers are reserved for now.
- return true;
+ return reg.is(rsp) || reg.is(rbp) || reg.is(rsi) || reg.is(r10);
}
@@ -47,20 +46,19 @@
int RegisterAllocator::ToNumber(Register reg) {
ASSERT(reg.is_valid() && !IsReserved(reg));
- UNIMPLEMENTED();
- return -1;
+ return reg.code();
}
Register RegisterAllocator::ToRegister(int num) {
ASSERT(num >= 0 && num < kNumRegisters);
- UNIMPLEMENTED();
- return no_reg;
+ Register result = {num};
+ return result;
}
void RegisterAllocator::Initialize() {
- UNIMPLEMENTED();
+ // TODO(X64): Implement.
}
« no previous file with comments | « src/x64/register-allocator-x64.h ('k') | src/x64/virtual-frame-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698