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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/register-allocator-x64.h ('k') | src/x64/virtual-frame-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 19 matching lines...) Expand all
30 30
31 #include "v8.h" 31 #include "v8.h"
32 32
33 namespace v8 { 33 namespace v8 {
34 namespace internal { 34 namespace internal {
35 35
36 // ------------------------------------------------------------------------- 36 // -------------------------------------------------------------------------
37 // RegisterAllocator implementation. 37 // RegisterAllocator implementation.
38 38
39 bool RegisterAllocator::IsReserved(Register reg) { 39 bool RegisterAllocator::IsReserved(Register reg) {
40 // All registers are reserved for now. 40 return reg.is(rsp) || reg.is(rbp) || reg.is(rsi) || reg.is(r10);
41 return true;
42 } 41 }
43 42
44 43
45 // The register allocator uses small integers to represent the 44 // The register allocator uses small integers to represent the
46 // non-reserved assembler registers. 45 // non-reserved assembler registers.
47 46
48 int RegisterAllocator::ToNumber(Register reg) { 47 int RegisterAllocator::ToNumber(Register reg) {
49 ASSERT(reg.is_valid() && !IsReserved(reg)); 48 ASSERT(reg.is_valid() && !IsReserved(reg));
50 UNIMPLEMENTED(); 49 return reg.code();
51 return -1;
52 } 50 }
53 51
54 52
55 Register RegisterAllocator::ToRegister(int num) { 53 Register RegisterAllocator::ToRegister(int num) {
56 ASSERT(num >= 0 && num < kNumRegisters); 54 ASSERT(num >= 0 && num < kNumRegisters);
57 UNIMPLEMENTED(); 55 Register result = {num};
58 return no_reg; 56 return result;
59 } 57 }
60 58
61 59
62 void RegisterAllocator::Initialize() { 60 void RegisterAllocator::Initialize() {
63 UNIMPLEMENTED(); 61 // TODO(X64): Implement.
64 } 62 }
65 63
66 64
67 } } // namespace v8::internal 65 } } // namespace v8::internal
68 66
69 #endif // V8_X64_REGISTER_ALLOCATOR_X64_INL_H_ 67 #endif // V8_X64_REGISTER_ALLOCATOR_X64_INL_H_
OLDNEW
« 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