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

Side by Side Diff: src/compiler/machine-operator.cc

Issue 974313002: [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: arm port. Created 5 years, 9 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
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/compiler/machine-operator.h" 5 #include "src/compiler/machine-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 struct Name##Operator FINAL : public Operator { \ 161 struct Name##Operator FINAL : public Operator { \
162 Name##Operator() \ 162 Name##Operator() \
163 : Operator(IrOpcode::k##Name, Operator::kPure | properties, #Name, \ 163 : Operator(IrOpcode::k##Name, Operator::kPure | properties, #Name, \
164 value_input_count, 0, control_input_count, output_count, 0, \ 164 value_input_count, 0, control_input_count, output_count, 0, \
165 0) {} \ 165 0) {} \
166 }; \ 166 }; \
167 Name##Operator k##Name; 167 Name##Operator k##Name;
168 PURE_OP_LIST(PURE) 168 PURE_OP_LIST(PURE)
169 #undef PURE 169 #undef PURE
170 170
171 template <int kLocation>
172 struct Float64ExtractWord32Operator FINAL : public Operator1<int> {
173 Float64ExtractWord32Operator()
174 : Operator1<int>(IrOpcode::kFloat64ExtractWord32, Operator::kPure,
175 "Float64ExtractWord32", 1, 0, 0, 1, 0, 0, kLocation) {}
176 };
177 Float64ExtractWord32Operator<0> kFloat64ExtractWord32Operator0;
178 Float64ExtractWord32Operator<1> kFloat64ExtractWord32Operator1;
179
180 template <int kLocation>
181 struct Float64InsertWord32Operator FINAL : public Operator1<int> {
182 Float64InsertWord32Operator()
183 : Operator1<int>(IrOpcode::kFloat64InsertWord32, Operator::kPure,
184 "Float64InsertWord32", 2, 0, 0, 1, 0, 0, kLocation) {}
185 };
186 Float64InsertWord32Operator<0> kFloat64InsertWord32Operator0;
187 Float64InsertWord32Operator<1> kFloat64InsertWord32Operator1;
188
171 #define LOAD(Type) \ 189 #define LOAD(Type) \
172 struct Load##Type##Operator FINAL : public Operator1<LoadRepresentation> { \ 190 struct Load##Type##Operator FINAL : public Operator1<LoadRepresentation> { \
173 Load##Type##Operator() \ 191 Load##Type##Operator() \
174 : Operator1<LoadRepresentation>( \ 192 : Operator1<LoadRepresentation>( \
175 IrOpcode::kLoad, Operator::kNoThrow | Operator::kNoWrite, \ 193 IrOpcode::kLoad, Operator::kNoThrow | Operator::kNoWrite, \
176 "Load", 2, 1, 1, 1, 1, 0, k##Type) {} \ 194 "Load", 2, 1, 1, 1, 1, 0, k##Type) {} \
177 }; \ 195 }; \
178 struct CheckedLoad##Type##Operator FINAL \ 196 struct CheckedLoad##Type##Operator FINAL \
179 : public Operator1<CheckedLoadRepresentation> { \ 197 : public Operator1<CheckedLoadRepresentation> { \
180 CheckedLoad##Type##Operator() \ 198 CheckedLoad##Type##Operator() \
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 249 }
232 250
233 251
234 #define PURE(Name, properties, value_input_count, control_input_count, \ 252 #define PURE(Name, properties, value_input_count, control_input_count, \
235 output_count) \ 253 output_count) \
236 const Operator* MachineOperatorBuilder::Name() { return &cache_.k##Name; } 254 const Operator* MachineOperatorBuilder::Name() { return &cache_.k##Name; }
237 PURE_OP_LIST(PURE) 255 PURE_OP_LIST(PURE)
238 #undef PURE 256 #undef PURE
239 257
240 258
259 const Operator* MachineOperatorBuilder::Float64ExtractWord32(int location) {
260 switch (location) {
261 case 0:
262 return &cache_.kFloat64ExtractWord32Operator0;
263 case 1:
264 return &cache_.kFloat64ExtractWord32Operator1;
265 }
266 UNREACHABLE();
267 return nullptr;
268 }
269
270
271 const Operator* MachineOperatorBuilder::Float64InsertWord32(int location) {
272 switch (location) {
273 case 0:
274 return &cache_.kFloat64InsertWord32Operator0;
275 case 1:
276 return &cache_.kFloat64InsertWord32Operator1;
277 }
278 UNREACHABLE();
279 return nullptr;
280 }
281
282
241 const Operator* MachineOperatorBuilder::Load(LoadRepresentation rep) { 283 const Operator* MachineOperatorBuilder::Load(LoadRepresentation rep) {
242 switch (rep) { 284 switch (rep) {
243 #define LOAD(Type) \ 285 #define LOAD(Type) \
244 case k##Type: \ 286 case k##Type: \
245 return &cache_.kLoad##Type; 287 return &cache_.kLoad##Type;
246 MACHINE_TYPE_LIST(LOAD) 288 MACHINE_TYPE_LIST(LOAD)
247 #undef LOAD 289 #undef LOAD
248 default: 290 default:
249 break; 291 break;
250 } 292 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 352 }
311 // Uncached. 353 // Uncached.
312 return new (zone_) Operator1<CheckedStoreRepresentation>( 354 return new (zone_) Operator1<CheckedStoreRepresentation>(
313 IrOpcode::kCheckedStore, Operator::kNoRead | Operator::kNoThrow, 355 IrOpcode::kCheckedStore, Operator::kNoRead | Operator::kNoThrow,
314 "CheckedStore", 4, 1, 1, 0, 1, 0, rep); 356 "CheckedStore", 4, 1, 1, 0, 1, 0, rep);
315 } 357 }
316 358
317 } // namespace compiler 359 } // namespace compiler
318 } // namespace internal 360 } // namespace internal
319 } // namespace v8 361 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698