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 118 matching lines...) Loading... | |
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, bool set_initialize_root_flag) { | 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. | |
140 // Check the types of the signature. | 139 // Check the types of the signature. |
141 // Currently no floating point parameters or returns are allowed because | 140 // Currently no floating point parameters or returns are allowed because |
142 // on x87 and ia32, the FP top of stack is involved. | 141 // on x87 and ia32, the FP top of stack is involved. |
143 | |
144 for (size_t i = 0; i < msig->return_count(); i++) { | 142 for (size_t i = 0; i < msig->return_count(); i++) { |
145 MachineType type = RepresentationOf(msig->GetReturn(i)); | 143 MachineRepresentation rep = msig->GetReturn(i).representation(); |
146 CHECK(type != kRepFloat32 && type != kRepFloat64); | 144 CHECK(rep != MachineRepresentation::kFloat32 && |
Benedikt Meurer
2016/02/15 12:45:32
Nit: two separate CHECKs instead of combining with
| |
145 rep != MachineRepresentation::kFloat64); | |
147 } | 146 } |
148 for (size_t i = 0; i < msig->parameter_count(); i++) { | 147 for (size_t i = 0; i < msig->parameter_count(); i++) { |
149 MachineType type = RepresentationOf(msig->GetParam(i)); | 148 MachineRepresentation rep = msig->GetParam(i).representation(); |
150 CHECK(type != kRepFloat32 && type != kRepFloat64); | 149 CHECK(rep != MachineRepresentation::kFloat32 && |
Benedikt Meurer
2016/02/15 12:45:32
Nit: two separate CHECKs instead of combining with
| |
150 rep != MachineRepresentation::kFloat64); | |
151 } | 151 } |
152 #endif | |
153 | 152 |
154 #ifdef UNSUPPORTED_C_LINKAGE | 153 #ifdef UNSUPPORTED_C_LINKAGE |
155 // This method should not be called on unknown architectures. | 154 // This method should not be called on unknown architectures. |
156 V8_Fatal(__FILE__, __LINE__, | 155 V8_Fatal(__FILE__, __LINE__, |
157 "requested C call descriptor on unsupported architecture"); | 156 "requested C call descriptor on unsupported architecture"); |
158 return nullptr; | 157 return nullptr; |
159 #endif | 158 #endif |
160 | 159 |
161 // Add return location(s). | 160 // Add return location(s). |
162 CHECK(locations.return_count_ <= 2); | 161 CHECK(locations.return_count_ <= 2); |
(...skipping 59 matching lines...) Loading... | |
222 kCalleeSaveFPRegisters, // callee-saved fp regs | 221 kCalleeSaveFPRegisters, // callee-saved fp regs |
223 set_initialize_root_flag ? // flags | 222 set_initialize_root_flag ? // flags |
224 CallDescriptor::kInitializeRootRegister | 223 CallDescriptor::kInitializeRootRegister |
225 : CallDescriptor::kNoFlags, | 224 : CallDescriptor::kNoFlags, |
226 "c-call"); | 225 "c-call"); |
227 } | 226 } |
228 | 227 |
229 } // namespace compiler | 228 } // namespace compiler |
230 } // namespace internal | 229 } // namespace internal |
231 } // namespace v8 | 230 } // namespace v8 |
OLD | NEW |