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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 #ifdef CALLEE_SAVE_FP_REGISTERS | 224 #ifdef CALLEE_SAVE_FP_REGISTERS |
225 const RegList kCalleeSaveFPRegisters = CALLEE_SAVE_FP_REGISTERS; | 225 const RegList kCalleeSaveFPRegisters = CALLEE_SAVE_FP_REGISTERS; |
226 #else | 226 #else |
227 const RegList kCalleeSaveFPRegisters = 0; | 227 const RegList kCalleeSaveFPRegisters = 0; |
228 #endif | 228 #endif |
229 | 229 |
230 // The target for C calls is always an address (i.e. machine pointer). | 230 // The target for C calls is always an address (i.e. machine pointer). |
231 MachineType target_type = MachineType::Pointer(); | 231 MachineType target_type = MachineType::Pointer(); |
232 LinkageLocation target_loc = LinkageLocation::ForAnyRegister(); | 232 LinkageLocation target_loc = LinkageLocation::ForAnyRegister(); |
| 233 CallDescriptor::Flags flags = CallDescriptor::kUseNativeStack; |
| 234 if (set_initialize_root_flag) { |
| 235 flags |= CallDescriptor::kInitializeRootRegister; |
| 236 } |
| 237 |
233 return new (zone) CallDescriptor( // -- | 238 return new (zone) CallDescriptor( // -- |
234 CallDescriptor::kCallAddress, // kind | 239 CallDescriptor::kCallAddress, // kind |
235 target_type, // target MachineType | 240 target_type, // target MachineType |
236 target_loc, // target location | 241 target_loc, // target location |
237 msig, // machine_sig | 242 msig, // machine_sig |
238 locations.Build(), // location_sig | 243 locations.Build(), // location_sig |
239 0, // stack_parameter_count | 244 0, // stack_parameter_count |
240 Operator::kNoProperties, // properties | 245 Operator::kNoProperties, // properties |
241 kCalleeSaveRegisters, // callee-saved registers | 246 kCalleeSaveRegisters, // callee-saved registers |
242 kCalleeSaveFPRegisters, // callee-saved fp regs | 247 kCalleeSaveFPRegisters, // callee-saved fp regs |
243 set_initialize_root_flag ? // flags | 248 flags, "c-call"); |
244 CallDescriptor::kInitializeRootRegister | |
245 : CallDescriptor::kNoFlags, | |
246 "c-call"); | |
247 } | 249 } |
248 | 250 |
249 } // namespace compiler | 251 } // namespace compiler |
250 } // namespace internal | 252 } // namespace internal |
251 } // namespace v8 | 253 } // namespace v8 |
OLD | NEW |