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

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

Issue 2410673002: [Turbofan] Add concept of FP register aliasing on ARM 32. (Closed)
Patch Set: Add a TODO. Created 4 years, 1 month 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/machine-type.h ('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 #include "src/globals.h" 9 #include "src/globals.h"
10 #include "src/machine-type.h" 10 #include "src/machine-type.h"
(...skipping 18 matching lines...) Expand all
29 29
30 // Default RegisterConfigurations for the target architecture. 30 // Default RegisterConfigurations for the target architecture.
31 // TODO(X87): This distinction in RegisterConfigurations is temporary 31 // TODO(X87): This distinction in RegisterConfigurations is temporary
32 // until x87 TF supports all of the registers that Crankshaft does. 32 // until x87 TF supports all of the registers that Crankshaft does.
33 static const RegisterConfiguration* Crankshaft(); 33 static const RegisterConfiguration* Crankshaft();
34 static const RegisterConfiguration* Turbofan(); 34 static const RegisterConfiguration* Turbofan();
35 35
36 RegisterConfiguration(int num_general_registers, int num_double_registers, 36 RegisterConfiguration(int num_general_registers, int num_double_registers,
37 int num_allocatable_general_registers, 37 int num_allocatable_general_registers,
38 int num_allocatable_double_registers, 38 int num_allocatable_double_registers,
39 int num_allocatable_aliased_double_registers,
40 const int* allocatable_general_codes, 39 const int* allocatable_general_codes,
41 const int* allocatable_double_codes, 40 const int* allocatable_double_codes,
42 AliasingKind fp_aliasing_kind, 41 AliasingKind fp_aliasing_kind,
43 char const* const* general_names, 42 char const* const* general_names,
44 char const* const* float_names, 43 char const* const* float_names,
45 char const* const* double_names, 44 char const* const* double_names,
46 char const* const* simd128_names); 45 char const* const* simd128_names);
47 46
48 int num_general_registers() const { return num_general_registers_; } 47 int num_general_registers() const { return num_general_registers_; }
49 int num_float_registers() const { return num_float_registers_; } 48 int num_float_registers() const { return num_float_registers_; }
50 int num_double_registers() const { return num_double_registers_; } 49 int num_double_registers() const { return num_double_registers_; }
51 int num_simd128_registers() const { return num_simd128_registers_; } 50 int num_simd128_registers() const { return num_simd128_registers_; }
52 int num_allocatable_general_registers() const { 51 int num_allocatable_general_registers() const {
53 return num_allocatable_general_registers_; 52 return num_allocatable_general_registers_;
54 } 53 }
55 int num_allocatable_float_registers() const { 54 int num_allocatable_float_registers() const {
56 return num_allocatable_float_registers_; 55 return num_allocatable_float_registers_;
57 } 56 }
58 int num_allocatable_double_registers() const { 57 int num_allocatable_double_registers() const {
59 return num_allocatable_double_registers_; 58 return num_allocatable_double_registers_;
60 } 59 }
61 // TODO(bbudge): This is a temporary work-around required because our
62 // register allocator does not yet support the aliasing of single/double
63 // registers on ARM.
64 int num_allocatable_aliased_double_registers() const {
65 return num_allocatable_aliased_double_registers_;
66 }
67 int num_allocatable_simd128_registers() const { 60 int num_allocatable_simd128_registers() const {
68 return num_allocatable_simd128_registers_; 61 return num_allocatable_simd128_registers_;
69 } 62 }
70 AliasingKind fp_aliasing_kind() const { return fp_aliasing_kind_; } 63 AliasingKind fp_aliasing_kind() const { return fp_aliasing_kind_; }
71 int32_t allocatable_general_codes_mask() const { 64 int32_t allocatable_general_codes_mask() const {
72 return allocatable_general_codes_mask_; 65 return allocatable_general_codes_mask_;
73 } 66 }
74 int32_t allocatable_double_codes_mask() const { 67 int32_t allocatable_double_codes_mask() const {
75 return allocatable_double_codes_mask_; 68 return allocatable_double_codes_mask_;
76 } 69 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 MachineRepresentation other_rep, int other_index) const; 129 MachineRepresentation other_rep, int other_index) const;
137 130
138 private: 131 private:
139 const int num_general_registers_; 132 const int num_general_registers_;
140 int num_float_registers_; 133 int num_float_registers_;
141 const int num_double_registers_; 134 const int num_double_registers_;
142 int num_simd128_registers_; 135 int num_simd128_registers_;
143 int num_allocatable_general_registers_; 136 int num_allocatable_general_registers_;
144 int num_allocatable_float_registers_; 137 int num_allocatable_float_registers_;
145 int num_allocatable_double_registers_; 138 int num_allocatable_double_registers_;
146 int num_allocatable_aliased_double_registers_;
147 int num_allocatable_simd128_registers_; 139 int num_allocatable_simd128_registers_;
148 int32_t allocatable_general_codes_mask_; 140 int32_t allocatable_general_codes_mask_;
149 int32_t allocatable_float_codes_mask_; 141 int32_t allocatable_float_codes_mask_;
150 int32_t allocatable_double_codes_mask_; 142 int32_t allocatable_double_codes_mask_;
151 int32_t allocatable_simd128_codes_mask_; 143 int32_t allocatable_simd128_codes_mask_;
152 const int* allocatable_general_codes_; 144 const int* allocatable_general_codes_;
153 int allocatable_float_codes_[kMaxFPRegisters]; 145 int allocatable_float_codes_[kMaxFPRegisters];
154 const int* allocatable_double_codes_; 146 const int* allocatable_double_codes_;
155 int allocatable_simd128_codes_[kMaxFPRegisters]; 147 int allocatable_simd128_codes_[kMaxFPRegisters];
156 AliasingKind fp_aliasing_kind_; 148 AliasingKind fp_aliasing_kind_;
157 char const* const* general_register_names_; 149 char const* const* general_register_names_;
158 char const* const* float_register_names_; 150 char const* const* float_register_names_;
159 char const* const* double_register_names_; 151 char const* const* double_register_names_;
160 char const* const* simd128_register_names_; 152 char const* const* simd128_register_names_;
161 }; 153 };
162 154
163 } // namespace internal 155 } // namespace internal
164 } // namespace v8 156 } // namespace v8
165 157
166 #endif // V8_COMPILER_REGISTER_CONFIGURATION_H_ 158 #endif // V8_COMPILER_REGISTER_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « src/machine-type.h ('k') | src/register-configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698