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

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

Issue 2092413002: [RegisterConfiguration] Streamline access to arch defaults, simplify Registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. Created 4 years, 5 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
« no previous file with comments | « src/register-configuration.cc ('k') | src/s390/deoptimizer-s390.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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 ALLOCATABLE_GENERAL_REGISTERS(REGISTER_BIT) 0; 138 ALLOCATABLE_GENERAL_REGISTERS(REGISTER_BIT) 0;
139 #undef REGISTER_BIT 139 #undef REGISTER_BIT
140 140
141 static Register from_code(int code) { 141 static Register from_code(int code) {
142 DCHECK(code >= 0); 142 DCHECK(code >= 0);
143 DCHECK(code < kNumRegisters); 143 DCHECK(code < kNumRegisters);
144 Register r = {code}; 144 Register r = {code};
145 return r; 145 return r;
146 } 146 }
147 147
148 const char* ToString();
149 bool IsAllocatable(RegisterConfiguration::CompilerSelector compiler =
150 RegisterConfiguration::CRANKSHAFT) const;
151 bool is_valid() const { return 0 <= reg_code && reg_code < kNumRegisters; } 148 bool is_valid() const { return 0 <= reg_code && reg_code < kNumRegisters; }
152 bool is(Register reg) const { return reg_code == reg.reg_code; } 149 bool is(Register reg) const { return reg_code == reg.reg_code; }
153 int code() const { 150 int code() const {
154 DCHECK(is_valid()); 151 DCHECK(is_valid());
155 return reg_code; 152 return reg_code;
156 } 153 }
157 int bit() const { 154 int bit() const {
158 DCHECK(is_valid()); 155 DCHECK(is_valid());
159 return 1 << reg_code; 156 return 1 << reg_code;
160 } 157 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 #define REGISTER_CODE(R) kCode_##R, 193 #define REGISTER_CODE(R) kCode_##R,
197 DOUBLE_REGISTERS(REGISTER_CODE) 194 DOUBLE_REGISTERS(REGISTER_CODE)
198 #undef REGISTER_CODE 195 #undef REGISTER_CODE
199 kAfterLast, 196 kAfterLast,
200 kCode_no_reg = -1 197 kCode_no_reg = -1
201 }; 198 };
202 199
203 static const int kNumRegisters = Code::kAfterLast; 200 static const int kNumRegisters = Code::kAfterLast;
204 static const int kMaxNumRegisters = kNumRegisters; 201 static const int kMaxNumRegisters = kNumRegisters;
205 202
206 const char* ToString();
207 bool IsAllocatable(RegisterConfiguration::CompilerSelector compiler =
208 RegisterConfiguration::CRANKSHAFT) const;
209 bool is_valid() const { return 0 <= reg_code && reg_code < kNumRegisters; } 203 bool is_valid() const { return 0 <= reg_code && reg_code < kNumRegisters; }
210 bool is(DoubleRegister reg) const { return reg_code == reg.reg_code; } 204 bool is(DoubleRegister reg) const { return reg_code == reg.reg_code; }
211 205
212 int code() const { 206 int code() const {
213 DCHECK(is_valid()); 207 DCHECK(is_valid());
214 return reg_code; 208 return reg_code;
215 } 209 }
216 210
217 int bit() const { 211 int bit() const {
218 DCHECK(is_valid()); 212 DCHECK(is_valid());
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 1456
1463 class EnsureSpace BASE_EMBEDDED { 1457 class EnsureSpace BASE_EMBEDDED {
1464 public: 1458 public:
1465 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } 1459 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); }
1466 }; 1460 };
1467 1461
1468 } // namespace internal 1462 } // namespace internal
1469 } // namespace v8 1463 } // namespace v8
1470 1464
1471 #endif // V8_S390_ASSEMBLER_S390_H_ 1465 #endif // V8_S390_ASSEMBLER_S390_H_
OLDNEW
« no previous file with comments | « src/register-configuration.cc ('k') | src/s390/deoptimizer-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698