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

Side by Side Diff: src/x64/assembler-x64.h

Issue 6647015: X64: Change kSmiConstantRegister to r12. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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 | « no previous file | src/x64/assembler-x64.cc » ('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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // mode. This way we get the compile-time error checking in debug mode 86 // mode. This way we get the compile-time error checking in debug mode
87 // and best performance in optimized code. 87 // and best performance in optimized code.
88 // 88 //
89 89
90 struct Register { 90 struct Register {
91 // The non-allocatable registers are: 91 // The non-allocatable registers are:
92 // rsp - stack pointer 92 // rsp - stack pointer
93 // rbp - frame pointer 93 // rbp - frame pointer
94 // rsi - context register 94 // rsi - context register
95 // r10 - fixed scratch register 95 // r10 - fixed scratch register
96 // r12 - smi constant register
96 // r13 - root register 97 // r13 - root register
97 // r15 - smi constant register
98 static const int kNumRegisters = 16; 98 static const int kNumRegisters = 16;
99 static const int kNumAllocatableRegisters = 10; 99 static const int kNumAllocatableRegisters = 10;
100 100
101 static int ToAllocationIndex(Register reg) { 101 static int ToAllocationIndex(Register reg) {
102 return kAllocationIndexByRegisterCode[reg.code()]; 102 return kAllocationIndexByRegisterCode[reg.code()];
103 } 103 }
104 104
105 static Register FromAllocationIndex(int index) { 105 static Register FromAllocationIndex(int index) {
106 ASSERT(index >= 0 && index < kNumAllocatableRegisters); 106 ASSERT(index >= 0 && index < kNumAllocatableRegisters);
107 Register result = { kRegisterCodeByAllocationIndex[index] }; 107 Register result = { kRegisterCodeByAllocationIndex[index] };
108 return result; 108 return result;
109 } 109 }
110 110
111 static const char* AllocationIndexToString(int index) { 111 static const char* AllocationIndexToString(int index) {
112 ASSERT(index >= 0 && index < kNumAllocatableRegisters); 112 ASSERT(index >= 0 && index < kNumAllocatableRegisters);
113 const char* const names[] = { 113 const char* const names[] = {
114 "rax", 114 "rax",
115 "rbx", 115 "rbx",
116 "rdx", 116 "rdx",
117 "rcx", 117 "rcx",
118 "rdi", 118 "rdi",
119 "r8", 119 "r8",
120 "r9", 120 "r9",
121 "r11", 121 "r11",
122 "r14", 122 "r14",
123 "r12" 123 "r15"
124 }; 124 };
125 return names[index]; 125 return names[index];
126 } 126 }
127 127
128 static Register toRegister(int code) { 128 static Register toRegister(int code) {
129 Register r = { code }; 129 Register r = { code };
130 return r; 130 return r;
131 } 131 }
132 bool is_valid() const { return 0 <= code_ && code_ < kNumRegisters; } 132 bool is_valid() const { return 0 <= code_ && code_ < kNumRegisters; }
133 bool is(Register reg) const { return code_ == reg.code_; } 133 bool is(Register reg) const { return code_ == reg.code_; }
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 private: 1582 private:
1583 Assembler* assembler_; 1583 Assembler* assembler_;
1584 #ifdef DEBUG 1584 #ifdef DEBUG
1585 int space_before_; 1585 int space_before_;
1586 #endif 1586 #endif
1587 }; 1587 };
1588 1588
1589 } } // namespace v8::internal 1589 } } // namespace v8::internal
1590 1590
1591 #endif // V8_X64_ASSEMBLER_X64_H_ 1591 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « no previous file | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698