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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // =========================================================================== | 126 // =========================================================================== |
127 // == unknown ================================================================ | 127 // == unknown ================================================================ |
128 // =========================================================================== | 128 // =========================================================================== |
129 #define UNSUPPORTED_C_LINKAGE 1 | 129 #define UNSUPPORTED_C_LINKAGE 1 |
130 #endif | 130 #endif |
131 } // namespace | 131 } // namespace |
132 | 132 |
133 | 133 |
134 // General code uses the above configuration data. | 134 // General code uses the above configuration data. |
135 CallDescriptor* Linkage::GetSimplifiedCDescriptor( | 135 CallDescriptor* Linkage::GetSimplifiedCDescriptor( |
136 Zone* zone, const MachineSignature* msig) { | 136 Zone* zone, const MachineSignature* msig, bool set_initialize_root_flag) { |
137 LocationSignature::Builder locations(zone, msig->return_count(), | 137 LocationSignature::Builder locations(zone, msig->return_count(), |
138 msig->parameter_count()); | 138 msig->parameter_count()); |
139 #if 0 // TODO(titzer): instruction selector tests break here. | 139 #if 0 // TODO(titzer): instruction selector tests break here. |
140 // Check the types of the signature. | 140 // Check the types of the signature. |
141 // Currently no floating point parameters or returns are allowed because | 141 // Currently no floating point parameters or returns are allowed because |
142 // on x87 and ia32, the FP top of stack is involved. | 142 // on x87 and ia32, the FP top of stack is involved. |
143 | 143 |
144 for (size_t i = 0; i < msig->return_count(); i++) { | 144 for (size_t i = 0; i < msig->return_count(); i++) { |
145 MachineType type = RepresentationOf(msig->GetReturn(i)); | 145 MachineType type = RepresentationOf(msig->GetReturn(i)); |
146 CHECK(type != kRepFloat32 && type != kRepFloat64); | 146 CHECK(type != kRepFloat32 && type != kRepFloat64); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 return new (zone) CallDescriptor( // -- | 213 return new (zone) CallDescriptor( // -- |
214 CallDescriptor::kCallAddress, // kind | 214 CallDescriptor::kCallAddress, // kind |
215 target_type, // target MachineType | 215 target_type, // target MachineType |
216 target_loc, // target location | 216 target_loc, // target location |
217 msig, // machine_sig | 217 msig, // machine_sig |
218 locations.Build(), // location_sig | 218 locations.Build(), // location_sig |
219 0, // stack_parameter_count | 219 0, // stack_parameter_count |
220 Operator::kNoProperties, // properties | 220 Operator::kNoProperties, // properties |
221 kCalleeSaveRegisters, // callee-saved registers | 221 kCalleeSaveRegisters, // callee-saved registers |
222 kCalleeSaveFPRegisters, // callee-saved fp regs | 222 kCalleeSaveFPRegisters, // callee-saved fp regs |
223 CallDescriptor::kNoFlags, // flags | 223 set_initialize_root_flag ? // flags |
| 224 CallDescriptor::kInitializeRootRegister |
| 225 : CallDescriptor::kNoFlags, |
224 "c-call"); | 226 "c-call"); |
225 } | 227 } |
226 | 228 |
227 } // namespace compiler | 229 } // namespace compiler |
228 } // namespace internal | 230 } // namespace internal |
229 } // namespace v8 | 231 } // namespace v8 |
OLD | NEW |