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

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

Issue 2176173003: [Turbofan] Revert FP register aliasing support on Arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 4 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.h ('k') | test/cctest/compiler/test-gap-resolver.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 #include "src/register-configuration.h" 5 #include "src/register-configuration.h"
6 #include "src/globals.h" 6 #include "src/globals.h"
7 #include "src/macro-assembler.h" 7 #include "src/macro-assembler.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 enum CompilerSelector { CRANKSHAFT, TURBOFAN }; 63 enum CompilerSelector { CRANKSHAFT, TURBOFAN };
64 64
65 class ArchDefaultRegisterConfiguration : public RegisterConfiguration { 65 class ArchDefaultRegisterConfiguration : public RegisterConfiguration {
66 public: 66 public:
67 explicit ArchDefaultRegisterConfiguration(CompilerSelector compiler) 67 explicit ArchDefaultRegisterConfiguration(CompilerSelector compiler)
68 : RegisterConfiguration( 68 : RegisterConfiguration(
69 Register::kNumRegisters, DoubleRegister::kMaxNumRegisters, 69 Register::kNumRegisters, DoubleRegister::kMaxNumRegisters,
70 #if V8_TARGET_ARCH_IA32 70 #if V8_TARGET_ARCH_IA32
71 kMaxAllocatableGeneralRegisterCount, 71 kMaxAllocatableGeneralRegisterCount,
72 kMaxAllocatableDoubleRegisterCount, 72 kMaxAllocatableDoubleRegisterCount,
73 kMaxAllocatableDoubleRegisterCount,
73 #elif V8_TARGET_ARCH_X87 74 #elif V8_TARGET_ARCH_X87
74 kMaxAllocatableGeneralRegisterCount, 75 kMaxAllocatableGeneralRegisterCount,
75 compiler == TURBOFAN ? 1 : kMaxAllocatableDoubleRegisterCount, 76 compiler == TURBOFAN ? 1 : kMaxAllocatableDoubleRegisterCount,
77 compiler == TURBOFAN ? 1 : kMaxAllocatableDoubleRegisterCount,
76 #elif V8_TARGET_ARCH_X64 78 #elif V8_TARGET_ARCH_X64
77 kMaxAllocatableGeneralRegisterCount, 79 kMaxAllocatableGeneralRegisterCount,
78 kMaxAllocatableDoubleRegisterCount, 80 kMaxAllocatableDoubleRegisterCount,
81 kMaxAllocatableDoubleRegisterCount,
79 #elif V8_TARGET_ARCH_ARM 82 #elif V8_TARGET_ARCH_ARM
80 FLAG_enable_embedded_constant_pool 83 FLAG_enable_embedded_constant_pool
81 ? (kMaxAllocatableGeneralRegisterCount - 1) 84 ? (kMaxAllocatableGeneralRegisterCount - 1)
82 : kMaxAllocatableGeneralRegisterCount, 85 : kMaxAllocatableGeneralRegisterCount,
83 CpuFeatures::IsSupported(VFP32DREGS) 86 CpuFeatures::IsSupported(VFP32DREGS)
84 ? kMaxAllocatableDoubleRegisterCount 87 ? kMaxAllocatableDoubleRegisterCount
85 : (ALLOCATABLE_NO_VFP32_DOUBLE_REGISTERS(REGISTER_COUNT) 0), 88 : (ALLOCATABLE_NO_VFP32_DOUBLE_REGISTERS(REGISTER_COUNT) 0),
89 ALLOCATABLE_NO_VFP32_DOUBLE_REGISTERS(REGISTER_COUNT) 0,
86 #elif V8_TARGET_ARCH_ARM64 90 #elif V8_TARGET_ARCH_ARM64
87 kMaxAllocatableGeneralRegisterCount, 91 kMaxAllocatableGeneralRegisterCount,
88 kMaxAllocatableDoubleRegisterCount, 92 kMaxAllocatableDoubleRegisterCount,
93 kMaxAllocatableDoubleRegisterCount,
89 #elif V8_TARGET_ARCH_MIPS 94 #elif V8_TARGET_ARCH_MIPS
90 kMaxAllocatableGeneralRegisterCount, 95 kMaxAllocatableGeneralRegisterCount,
91 kMaxAllocatableDoubleRegisterCount, 96 kMaxAllocatableDoubleRegisterCount,
97 kMaxAllocatableDoubleRegisterCount,
92 #elif V8_TARGET_ARCH_MIPS64 98 #elif V8_TARGET_ARCH_MIPS64
93 kMaxAllocatableGeneralRegisterCount, 99 kMaxAllocatableGeneralRegisterCount,
94 kMaxAllocatableDoubleRegisterCount, 100 kMaxAllocatableDoubleRegisterCount,
101 kMaxAllocatableDoubleRegisterCount,
95 #elif V8_TARGET_ARCH_PPC 102 #elif V8_TARGET_ARCH_PPC
96 kMaxAllocatableGeneralRegisterCount, 103 kMaxAllocatableGeneralRegisterCount,
97 kMaxAllocatableDoubleRegisterCount, 104 kMaxAllocatableDoubleRegisterCount,
105 kMaxAllocatableDoubleRegisterCount,
98 #elif V8_TARGET_ARCH_S390 106 #elif V8_TARGET_ARCH_S390
99 kMaxAllocatableGeneralRegisterCount, 107 kMaxAllocatableGeneralRegisterCount,
100 kMaxAllocatableDoubleRegisterCount, 108 kMaxAllocatableDoubleRegisterCount,
109 kMaxAllocatableDoubleRegisterCount,
101 #else 110 #else
102 #error Unsupported target architecture. 111 #error Unsupported target architecture.
103 #endif 112 #endif
104 kAllocatableGeneralCodes, kAllocatableDoubleCodes, 113 kAllocatableGeneralCodes, kAllocatableDoubleCodes,
105 kSimpleFPAliasing ? AliasingKind::OVERLAP : AliasingKind::COMBINE, 114 kSimpleFPAliasing ? AliasingKind::OVERLAP : AliasingKind::COMBINE,
106 kGeneralRegisterNames, kFloatRegisterNames, kDoubleRegisterNames, 115 kGeneralRegisterNames, kFloatRegisterNames, kDoubleRegisterNames,
107 kSimd128RegisterNames) { 116 kSimd128RegisterNames) {
108 } 117 }
109 }; 118 };
110 119
(...skipping 18 matching lines...) Expand all
129 return &kDefaultRegisterConfigurationForCrankshaft.Get(); 138 return &kDefaultRegisterConfigurationForCrankshaft.Get();
130 } 139 }
131 140
132 const RegisterConfiguration* RegisterConfiguration::Turbofan() { 141 const RegisterConfiguration* RegisterConfiguration::Turbofan() {
133 return &kDefaultRegisterConfigurationForTurboFan.Get(); 142 return &kDefaultRegisterConfigurationForTurboFan.Get();
134 } 143 }
135 144
136 RegisterConfiguration::RegisterConfiguration( 145 RegisterConfiguration::RegisterConfiguration(
137 int num_general_registers, int num_double_registers, 146 int num_general_registers, int num_double_registers,
138 int num_allocatable_general_registers, int num_allocatable_double_registers, 147 int num_allocatable_general_registers, int num_allocatable_double_registers,
148 int num_allocatable_aliased_double_registers,
139 const int* allocatable_general_codes, const int* allocatable_double_codes, 149 const int* allocatable_general_codes, const int* allocatable_double_codes,
140 AliasingKind fp_aliasing_kind, const char* const* general_register_names, 150 AliasingKind fp_aliasing_kind, const char* const* general_register_names,
141 const char* const* float_register_names, 151 const char* const* float_register_names,
142 const char* const* double_register_names, 152 const char* const* double_register_names,
143 const char* const* simd128_register_names) 153 const char* const* simd128_register_names)
144 : num_general_registers_(num_general_registers), 154 : num_general_registers_(num_general_registers),
145 num_float_registers_(0), 155 num_float_registers_(0),
146 num_double_registers_(num_double_registers), 156 num_double_registers_(num_double_registers),
147 num_simd128_registers_(0), 157 num_simd128_registers_(0),
148 num_allocatable_general_registers_(num_allocatable_general_registers), 158 num_allocatable_general_registers_(num_allocatable_general_registers),
149 num_allocatable_float_registers_(0), 159 num_allocatable_float_registers_(0),
150 num_allocatable_double_registers_(num_allocatable_double_registers), 160 num_allocatable_double_registers_(num_allocatable_double_registers),
161 num_allocatable_aliased_double_registers_(
162 num_allocatable_aliased_double_registers),
151 num_allocatable_simd128_registers_(0), 163 num_allocatable_simd128_registers_(0),
152 allocatable_general_codes_mask_(0), 164 allocatable_general_codes_mask_(0),
153 allocatable_float_codes_mask_(0), 165 allocatable_float_codes_mask_(0),
154 allocatable_double_codes_mask_(0), 166 allocatable_double_codes_mask_(0),
155 allocatable_simd128_codes_mask_(0), 167 allocatable_simd128_codes_mask_(0),
156 allocatable_general_codes_(allocatable_general_codes), 168 allocatable_general_codes_(allocatable_general_codes),
157 allocatable_double_codes_(allocatable_double_codes), 169 allocatable_double_codes_(allocatable_double_codes),
158 fp_aliasing_kind_(fp_aliasing_kind), 170 fp_aliasing_kind_(fp_aliasing_kind),
159 general_register_names_(general_register_names), 171 general_register_names_(general_register_names),
160 float_register_names_(float_register_names), 172 float_register_names_(float_register_names),
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 return index == other_index >> shift; 269 return index == other_index >> shift;
258 } 270 }
259 int shift = other_rep_int - rep_int; 271 int shift = other_rep_int - rep_int;
260 return index >> shift == other_index; 272 return index >> shift == other_index;
261 } 273 }
262 274
263 #undef REGISTER_COUNT 275 #undef REGISTER_COUNT
264 276
265 } // namespace internal 277 } // namespace internal
266 } // namespace v8 278 } // namespace v8
OLDNEW
« no previous file with comments | « src/register-configuration.h ('k') | test/cctest/compiler/test-gap-resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698