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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
589 temps); | 589 temps); |
590 } | 590 } |
591 | 591 |
592 | 592 |
593 void InstructionSelector::VisitFloat64Sqrt(Node* node) { | 593 void InstructionSelector::VisitFloat64Sqrt(Node* node) { |
594 IA32OperandGenerator g(this); | 594 IA32OperandGenerator g(this); |
595 Emit(kSSEFloat64Sqrt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 595 Emit(kSSEFloat64Sqrt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
596 } | 596 } |
597 | 597 |
598 | 598 |
599 void InstructionSelector::VisitFloat64Floor(Node* node) { | |
dcarney
2014/10/27 08:15:08
should dcheck that sse4.1 is supported here instea
sigurds
2014/10/28 12:47:22
Done.
| |
600 IA32OperandGenerator g(this); | |
601 Emit(kSSEFloat64Floor, g.DefineAsRegister(node), | |
602 g.UseRegister(node->InputAt(0))); | |
603 } | |
604 | |
605 | |
606 void InstructionSelector::VisitFloat64Ceil(Node* node) { | |
607 IA32OperandGenerator g(this); | |
608 Emit(kSSEFloat64Ceil, g.DefineAsRegister(node), | |
609 g.UseRegister(node->InputAt(0))); | |
610 } | |
611 | |
612 | |
613 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { | |
614 IA32OperandGenerator g(this); | |
615 Emit(kSSEFloat64RoundTruncate, g.DefineAsRegister(node), | |
616 g.UseRegister(node->InputAt(0))); | |
617 } | |
618 | |
619 | |
620 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { | |
621 UnsupportedOperator(node); | |
622 } | |
623 | |
624 | |
599 void InstructionSelector::VisitCall(Node* node) { | 625 void InstructionSelector::VisitCall(Node* node) { |
600 IA32OperandGenerator g(this); | 626 IA32OperandGenerator g(this); |
601 CallDescriptor* descriptor = OpParameter<CallDescriptor*>(node); | 627 CallDescriptor* descriptor = OpParameter<CallDescriptor*>(node); |
602 | 628 |
603 FrameStateDescriptor* frame_state_descriptor = NULL; | 629 FrameStateDescriptor* frame_state_descriptor = NULL; |
604 | 630 |
605 if (descriptor->NeedsFrameState()) { | 631 if (descriptor->NeedsFrameState()) { |
606 frame_state_descriptor = | 632 frame_state_descriptor = |
607 GetFrameStateDescriptor(node->InputAt(descriptor->InputCount())); | 633 GetFrameStateDescriptor(node->InputAt(descriptor->InputCount())); |
608 } | 634 } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
874 | 900 |
875 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { | 901 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { |
876 FlagsContinuation cont(kUnorderedLessThanOrEqual, node); | 902 FlagsContinuation cont(kUnorderedLessThanOrEqual, node); |
877 VisitFloat64Compare(this, node, &cont); | 903 VisitFloat64Compare(this, node, &cont); |
878 } | 904 } |
879 | 905 |
880 | 906 |
881 // static | 907 // static |
882 MachineOperatorBuilder::Flags | 908 MachineOperatorBuilder::Flags |
883 InstructionSelector::SupportedMachineOperatorFlags() { | 909 InstructionSelector::SupportedMachineOperatorFlags() { |
910 if (CpuFeatures::IsSupported(SSE4_1)) { | |
911 return MachineOperatorBuilder::Flag::kFloat64Floor | | |
912 MachineOperatorBuilder::Flag::kFloat64Ceil | | |
913 MachineOperatorBuilder::Flag::kFloat64RoundTruncate; | |
914 } | |
884 return MachineOperatorBuilder::Flag::kNoFlags; | 915 return MachineOperatorBuilder::Flag::kNoFlags; |
885 } | 916 } |
886 } // namespace compiler | 917 } // namespace compiler |
887 } // namespace internal | 918 } // namespace internal |
888 } // namespace v8 | 919 } // namespace v8 |
OLD | NEW |