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

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

Issue 9455088: Remove static initializers in v8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Lint. Created 8 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
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 // Unfortunately we can't make this private in a struct when initializing 155 // Unfortunately we can't make this private in a struct when initializing
156 // by assignment. 156 // by assignment.
157 int code_; 157 int code_;
158 158
159 private: 159 private:
160 static const int kRegisterCodeByAllocationIndex[kNumAllocatableRegisters]; 160 static const int kRegisterCodeByAllocationIndex[kNumAllocatableRegisters];
161 static const int kAllocationIndexByRegisterCode[kNumRegisters]; 161 static const int kAllocationIndexByRegisterCode[kNumRegisters];
162 }; 162 };
163 163
164 const Register rax = { 0 }; 164 const int kRegisterRaxCode = 0;
165 const Register rcx = { 1 }; 165 const int kRegisterRcxCode = 1;
166 const Register rdx = { 2 }; 166 const int kRegisterRdxCode = 2;
167 const Register rbx = { 3 }; 167 const int kRegisterRbxCode = 3;
168 const Register rsp = { 4 }; 168 const int kRegisterRspCode = 4;
169 const Register rbp = { 5 }; 169 const int kRegisterRbpCode = 5;
170 const Register rsi = { 6 }; 170 const int kRegisterRsiCode = 6;
171 const Register rdi = { 7 }; 171 const int kRegisterRdiCode = 7;
172 const Register r8 = { 8 }; 172 const int kRegisterR8Code = 8;
173 const Register r9 = { 9 }; 173 const int kRegisterR9Code = 9;
174 const Register r10 = { 10 }; 174 const int kRegisterR10Code = 10;
175 const Register r11 = { 11 }; 175 const int kRegisterR11Code = 11;
176 const Register r12 = { 12 }; 176 const int kRegisterR12Code = 12;
177 const Register r13 = { 13 }; 177 const int kRegisterR13Code = 13;
178 const Register r14 = { 14 }; 178 const int kRegisterR14Code = 14;
179 const Register r15 = { 15 }; 179 const int kRegisterR15Code = 15;
180 const Register no_reg = { -1 }; 180 const int kRegisterNoneCode = -1;
181
182 const Register rax = { kRegisterRaxCode };
183 const Register rcx = { kRegisterRcxCode };
184 const Register rdx = { kRegisterRdxCode };
185 const Register rbx = { kRegisterRbxCode };
186 const Register rsp = { kRegisterRspCode };
187 const Register rbp = { kRegisterRbpCode };
188 const Register rsi = { kRegisterRsiCode };
189 const Register rdi = { kRegisterRdiCode };
190 const Register r8 = { kRegisterR8Code };
191 const Register r9 = { kRegisterR9Code };
192 const Register r10 = { kRegisterR10Code };
193 const Register r11 = { kRegisterR11Code };
194 const Register r12 = { kRegisterR12Code };
195 const Register r13 = { kRegisterR13Code };
196 const Register r14 = { kRegisterR14Code };
197 const Register r15 = { kRegisterR15Code };
198 const Register no_reg = { kRegisterNoneCode };
181 199
182 200
183 struct XMMRegister { 201 struct XMMRegister {
184 static const int kNumRegisters = 16; 202 static const int kNumRegisters = 16;
185 static const int kNumAllocatableRegisters = 15; 203 static const int kNumAllocatableRegisters = 15;
186 204
187 static int ToAllocationIndex(XMMRegister reg) { 205 static int ToAllocationIndex(XMMRegister reg) {
188 ASSERT(reg.code() != 0); 206 ASSERT(reg.code() != 0);
189 return reg.code() - 1; 207 return reg.code() - 1;
190 } 208 }
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 private: 1664 private:
1647 Assembler* assembler_; 1665 Assembler* assembler_;
1648 #ifdef DEBUG 1666 #ifdef DEBUG
1649 int space_before_; 1667 int space_before_;
1650 #endif 1668 #endif
1651 }; 1669 };
1652 1670
1653 } } // namespace v8::internal 1671 } } // namespace v8::internal
1654 1672
1655 #endif // V8_X64_ASSEMBLER_X64_H_ 1673 #endif // V8_X64_ASSEMBLER_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698