OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_REGISTER_CONFIGURATION_H_ | 5 #ifndef V8_COMPILER_REGISTER_CONFIGURATION_H_ |
6 #define V8_COMPILER_REGISTER_CONFIGURATION_H_ | 6 #define V8_COMPILER_REGISTER_CONFIGURATION_H_ |
7 | 7 |
8 #include "src/base/macros.h" | 8 #include "src/base/macros.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 // An architecture independent representation of the sets of registers available | 13 // An architecture independent representation of the sets of registers available |
14 // for instruction creation. | 14 // for instruction creation. |
15 class RegisterConfiguration { | 15 class RegisterConfiguration { |
16 public: | 16 public: |
17 // Define the optimized compiler selector for register configuration | 17 // Define the optimized compiler selector for register configuration |
18 // selection. | 18 // selection. |
19 // | 19 // |
20 // TODO(X87): This distinction in RegisterConfigurations is temporary | 20 // TODO(X87): This distinction in RegisterConfigurations is temporary |
21 // until x87 TF supports all of the registers that Crankshaft does. | 21 // until x87 TF supports all of the registers that Crankshaft does. |
22 enum CompilerSelector { CRANKSHAFT, TURBOFAN }; | 22 enum CompilerSelector { CRANKSHAFT, TURBOFAN }; |
23 | 23 |
24 // Architecture independent maxes. | 24 // Architecture independent maxes. |
25 static const int kMaxGeneralRegisters = 32; | 25 static const int kMaxGeneralRegisters = 32; |
26 static const int kMaxDoubleRegisters = 32; | 26 static const int kMaxFPRegisters = 32; |
27 | 27 |
28 static const RegisterConfiguration* ArchDefault(CompilerSelector compiler); | 28 static const RegisterConfiguration* ArchDefault(CompilerSelector compiler); |
29 | 29 |
30 RegisterConfiguration(int num_general_registers, int num_double_registers, | 30 RegisterConfiguration(int num_general_registers, int num_double_registers, |
31 int num_allocatable_general_registers, | 31 int num_allocatable_general_registers, |
32 int num_allocatable_double_registers, | 32 int num_allocatable_double_registers, |
33 int num_allocatable_aliased_double_registers, | 33 int num_allocatable_aliased_double_registers, |
34 const int* allocatable_general_codes, | 34 const int* allocatable_general_codes, |
35 const int* allocatable_double_codes, | 35 const int* allocatable_double_codes, |
36 char const* const* general_names, | 36 char const* const* general_names, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 const int* allocatable_general_codes_; | 86 const int* allocatable_general_codes_; |
87 const int* allocatable_double_codes_; | 87 const int* allocatable_double_codes_; |
88 char const* const* general_register_names_; | 88 char const* const* general_register_names_; |
89 char const* const* double_register_names_; | 89 char const* const* double_register_names_; |
90 }; | 90 }; |
91 | 91 |
92 } // namespace internal | 92 } // namespace internal |
93 } // namespace v8 | 93 } // namespace v8 |
94 | 94 |
95 #endif // V8_COMPILER_REGISTER_CONFIGURATION_H_ | 95 #endif // V8_COMPILER_REGISTER_CONFIGURATION_H_ |
OLD | NEW |