OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/assembler.h" | 5 #include "src/assembler.h" |
6 #include "src/macro-assembler.h" | 6 #include "src/macro-assembler.h" |
7 | 7 |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 | 9 |
10 #include "src/zone.h" | 10 #include "src/zone.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 if (locations.return_count_ > 0) { | 184 if (locations.return_count_ > 0) { |
185 locations.AddReturn(regloc(kReturnRegister0, msig->GetReturn(0))); | 185 locations.AddReturn(regloc(kReturnRegister0, msig->GetReturn(0))); |
186 } | 186 } |
187 if (locations.return_count_ > 1) { | 187 if (locations.return_count_ > 1) { |
188 locations.AddReturn(regloc(kReturnRegister1, msig->GetReturn(1))); | 188 locations.AddReturn(regloc(kReturnRegister1, msig->GetReturn(1))); |
189 } | 189 } |
190 | 190 |
191 const int parameter_count = static_cast<int>(msig->parameter_count()); | 191 const int parameter_count = static_cast<int>(msig->parameter_count()); |
192 | 192 |
193 #ifdef PARAM_REGISTERS | 193 #ifdef PARAM_REGISTERS |
194 static const Register kParamRegisters[] = {PARAM_REGISTERS}; | 194 const Register kParamRegisters[] = {PARAM_REGISTERS}; |
195 static const int kParamRegisterCount = | 195 const int kParamRegisterCount = static_cast<int>(arraysize(kParamRegisters)); |
196 static_cast<int>(arraysize(kParamRegisters)); | |
197 #else | 196 #else |
198 static const Register* kParamRegisters = nullptr; | 197 const Register* kParamRegisters = nullptr; |
199 static const int kParamRegisterCount = 0; | 198 const int kParamRegisterCount = 0; |
200 #endif | 199 #endif |
201 | 200 |
202 #ifdef STACK_SHADOW_WORDS | 201 #ifdef STACK_SHADOW_WORDS |
203 int stack_offset = STACK_SHADOW_WORDS; | 202 int stack_offset = STACK_SHADOW_WORDS; |
204 #else | 203 #else |
205 int stack_offset = 0; | 204 int stack_offset = 0; |
206 #endif | 205 #endif |
207 // Add register and/or stack parameter(s). | 206 // Add register and/or stack parameter(s). |
208 for (int i = 0; i < parameter_count; i++) { | 207 for (int i = 0; i < parameter_count; i++) { |
209 if (i < kParamRegisterCount) { | 208 if (i < kParamRegisterCount) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 0, // stack_parameter_count | 242 0, // stack_parameter_count |
244 Operator::kNoProperties, // properties | 243 Operator::kNoProperties, // properties |
245 kCalleeSaveRegisters, // callee-saved registers | 244 kCalleeSaveRegisters, // callee-saved registers |
246 kCalleeSaveFPRegisters, // callee-saved fp regs | 245 kCalleeSaveFPRegisters, // callee-saved fp regs |
247 flags, "c-call"); | 246 flags, "c-call"); |
248 } | 247 } |
249 | 248 |
250 } // namespace compiler | 249 } // namespace compiler |
251 } // namespace internal | 250 } // namespace internal |
252 } // namespace v8 | 251 } // namespace v8 |
OLD | NEW |