OLD | NEW |
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/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 #include "src/compiler/node-properties-inl.h" | 7 #include "src/compiler/node-properties-inl.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 | 355 |
356 | 356 |
357 void InstructionSelector::VisitChangeInt32ToFloat64(Node* node) { | 357 void InstructionSelector::VisitChangeInt32ToFloat64(Node* node) { |
358 IA32OperandGenerator g(this); | 358 IA32OperandGenerator g(this); |
359 Emit(kSSEInt32ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 359 Emit(kSSEInt32ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
360 } | 360 } |
361 | 361 |
362 | 362 |
363 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { | 363 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { |
364 IA32OperandGenerator g(this); | 364 IA32OperandGenerator g(this); |
365 // TODO(turbofan): IA32 SSE LoadUint32() should take an operand. | 365 Emit(kSSEUint32ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
366 Emit(kSSEUint32ToFloat64, g.DefineAsRegister(node), | |
367 g.UseRegister(node->InputAt(0))); | |
368 } | 366 } |
369 | 367 |
370 | 368 |
371 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { | 369 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { |
372 IA32OperandGenerator g(this); | 370 IA32OperandGenerator g(this); |
373 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 371 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
374 } | 372 } |
375 | 373 |
376 | 374 |
377 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { | 375 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 if (descriptor->kind() == CallDescriptor::kCallAddress && | 558 if (descriptor->kind() == CallDescriptor::kCallAddress && |
561 buffer.pushed_nodes.size() > 0) { | 559 buffer.pushed_nodes.size() > 0) { |
562 DCHECK(deoptimization == NULL && continuation == NULL); | 560 DCHECK(deoptimization == NULL && continuation == NULL); |
563 Emit(kArchDrop | MiscField::encode(buffer.pushed_nodes.size()), NULL); | 561 Emit(kArchDrop | MiscField::encode(buffer.pushed_nodes.size()), NULL); |
564 } | 562 } |
565 } | 563 } |
566 | 564 |
567 } // namespace compiler | 565 } // namespace compiler |
568 } // namespace internal | 566 } // namespace internal |
569 } // namespace v8 | 567 } // namespace v8 |
OLD | NEW |