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

Side by Side Diff: src/register-configuration.h

Issue 1405673003: provides a mechanism for optimizing compilers to select the different Register configuration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add the TODO comments. Created 5 years, 2 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/ppc/macro-assembler-ppc.cc ('k') | src/register-configuration.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 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
18 // selection.
19 //
20 // TODO(X87): This distinction in RegisterConfigurations is temporary
21 // until x87 TF supports all of the registers that Crankshaft does.
22 enum CompilerSelector { CRANKSHAFT, TURBOFAN };
23
17 // Architecture independent maxes. 24 // Architecture independent maxes.
18 static const int kMaxGeneralRegisters = 32; 25 static const int kMaxGeneralRegisters = 32;
19 static const int kMaxDoubleRegisters = 32; 26 static const int kMaxDoubleRegisters = 32;
20 27
21 static const RegisterConfiguration* ArchDefault(); 28 static const RegisterConfiguration* ArchDefault(CompilerSelector compiler);
22 29
23 RegisterConfiguration(int num_general_registers, int num_double_registers, 30 RegisterConfiguration(int num_general_registers, int num_double_registers,
24 int num_allocatable_general_registers, 31 int num_allocatable_general_registers,
25 int num_allocatable_double_registers, 32 int num_allocatable_double_registers,
26 int num_allocatable_aliased_double_registers, 33 int num_allocatable_aliased_double_registers,
27 const int* allocatable_general_codes, 34 const int* allocatable_general_codes,
28 const int* allocatable_double_codes, 35 const int* allocatable_double_codes,
29 char const* const* general_names, 36 char const* const* general_names,
30 char const* const* double_names); 37 char const* const* double_names);
31 38
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const int* allocatable_general_codes_; 86 const int* allocatable_general_codes_;
80 const int* allocatable_double_codes_; 87 const int* allocatable_double_codes_;
81 char const* const* general_register_names_; 88 char const* const* general_register_names_;
82 char const* const* double_register_names_; 89 char const* const* double_register_names_;
83 }; 90 };
84 91
85 } // namespace internal 92 } // namespace internal
86 } // namespace v8 93 } // namespace v8
87 94
88 #endif // V8_COMPILER_REGISTER_CONFIGURATION_H_ 95 #endif // V8_COMPILER_REGISTER_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | src/register-configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698