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 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 | 493 |
494 | 494 |
495 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { | 495 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { |
496 X64OperandGenerator g(this); | 496 X64OperandGenerator g(this); |
497 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 497 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
498 } | 498 } |
499 | 499 |
500 | 500 |
501 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { | 501 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
502 X64OperandGenerator g(this); | 502 X64OperandGenerator g(this); |
503 // TODO(turbofan): X64 SSE cvttsd2siq should support operands. | 503 Emit(kSSEFloat64ToUint32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
504 Emit(kSSEFloat64ToUint32, g.DefineAsRegister(node), | |
505 g.UseRegister(node->InputAt(0))); | |
506 } | 504 } |
507 | 505 |
508 | 506 |
509 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { | 507 void InstructionSelector::VisitChangeInt32ToInt64(Node* node) { |
510 X64OperandGenerator g(this); | 508 X64OperandGenerator g(this); |
511 Emit(kX64Movsxlq, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 509 Emit(kX64Movsxlq, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
512 } | 510 } |
513 | 511 |
514 | 512 |
515 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { | 513 void InstructionSelector::VisitChangeUint32ToUint64(Node* node) { |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 DCHECK(deoptimization == NULL && continuation == NULL); | 720 DCHECK(deoptimization == NULL && continuation == NULL); |
723 Emit(kArchDrop | | 721 Emit(kArchDrop | |
724 MiscField::encode(static_cast<int>(buffer.pushed_nodes.size())), | 722 MiscField::encode(static_cast<int>(buffer.pushed_nodes.size())), |
725 NULL); | 723 NULL); |
726 } | 724 } |
727 } | 725 } |
728 | 726 |
729 } // namespace compiler | 727 } // namespace compiler |
730 } // namespace internal | 728 } // namespace internal |
731 } // namespace v8 | 729 } // namespace v8 |
OLD | NEW |