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/base/bits.h" | 5 #include "src/base/bits.h" |
6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 case IrOpcode::kInt64LessThan: | 902 case IrOpcode::kInt64LessThan: |
903 cont->OverwriteAndNegateIfEqual(kSignedLessThan); | 903 cont->OverwriteAndNegateIfEqual(kSignedLessThan); |
904 return VisitWord64Compare(selector, value, cont); | 904 return VisitWord64Compare(selector, value, cont); |
905 case IrOpcode::kInt64LessThanOrEqual: | 905 case IrOpcode::kInt64LessThanOrEqual: |
906 cont->OverwriteAndNegateIfEqual(kSignedLessThanOrEqual); | 906 cont->OverwriteAndNegateIfEqual(kSignedLessThanOrEqual); |
907 return VisitWord64Compare(selector, value, cont); | 907 return VisitWord64Compare(selector, value, cont); |
908 case IrOpcode::kUint64LessThan: | 908 case IrOpcode::kUint64LessThan: |
909 cont->OverwriteAndNegateIfEqual(kUnsignedLessThan); | 909 cont->OverwriteAndNegateIfEqual(kUnsignedLessThan); |
910 return VisitWord64Compare(selector, value, cont); | 910 return VisitWord64Compare(selector, value, cont); |
911 case IrOpcode::kFloat64Equal: | 911 case IrOpcode::kFloat64Equal: |
912 cont->OverwriteAndNegateIfEqual(kUnorderedEqual); | 912 cont->OverwriteAndNegateIfEqual(kEqual); |
913 return VisitFloat64Compare(selector, value, cont); | 913 return VisitFloat64Compare(selector, value, cont); |
914 case IrOpcode::kFloat64LessThan: | 914 case IrOpcode::kFloat64LessThan: |
915 cont->OverwriteAndNegateIfEqual(kUnorderedLessThan); | 915 cont->OverwriteAndNegateIfEqual(kUnsignedLessThan); |
916 return VisitFloat64Compare(selector, value, cont); | 916 return VisitFloat64Compare(selector, value, cont); |
917 case IrOpcode::kFloat64LessThanOrEqual: | 917 case IrOpcode::kFloat64LessThanOrEqual: |
918 cont->OverwriteAndNegateIfEqual(kUnorderedLessThanOrEqual); | 918 cont->OverwriteAndNegateIfEqual(kUnsignedLessThanOrEqual); |
919 return VisitFloat64Compare(selector, value, cont); | 919 return VisitFloat64Compare(selector, value, cont); |
920 case IrOpcode::kProjection: | 920 case IrOpcode::kProjection: |
921 // Check if this is the overflow output projection of an | 921 // Check if this is the overflow output projection of an |
922 // <Operation>WithOverflow node. | 922 // <Operation>WithOverflow node. |
923 if (OpParameter<size_t>(value) == 1u) { | 923 if (OpParameter<size_t>(value) == 1u) { |
924 // We cannot combine the <Operation>WithOverflow with this branch | 924 // We cannot combine the <Operation>WithOverflow with this branch |
925 // unless the 0th projection (the use of the actual value of the | 925 // unless the 0th projection (the use of the actual value of the |
926 // <Operation> is either NULL, which means there's no use of the | 926 // <Operation> is either NULL, which means there's no use of the |
927 // actual value, or was already defined, which means it is scheduled | 927 // actual value, or was already defined, which means it is scheduled |
928 // *AFTER* this branch). | 928 // *AFTER* this branch). |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 } | 1042 } |
1043 | 1043 |
1044 | 1044 |
1045 void InstructionSelector::VisitUint64LessThan(Node* node) { | 1045 void InstructionSelector::VisitUint64LessThan(Node* node) { |
1046 FlagsContinuation cont(kUnsignedLessThan, node); | 1046 FlagsContinuation cont(kUnsignedLessThan, node); |
1047 VisitWord64Compare(this, node, &cont); | 1047 VisitWord64Compare(this, node, &cont); |
1048 } | 1048 } |
1049 | 1049 |
1050 | 1050 |
1051 void InstructionSelector::VisitFloat64Equal(Node* node) { | 1051 void InstructionSelector::VisitFloat64Equal(Node* node) { |
1052 FlagsContinuation cont(kUnorderedEqual, node); | 1052 FlagsContinuation cont(kEqual, node); |
1053 VisitFloat64Compare(this, node, &cont); | 1053 VisitFloat64Compare(this, node, &cont); |
1054 } | 1054 } |
1055 | 1055 |
1056 | 1056 |
1057 void InstructionSelector::VisitFloat64LessThan(Node* node) { | 1057 void InstructionSelector::VisitFloat64LessThan(Node* node) { |
1058 FlagsContinuation cont(kUnorderedLessThan, node); | 1058 FlagsContinuation cont(kUnsignedLessThan, node); |
1059 VisitFloat64Compare(this, node, &cont); | 1059 VisitFloat64Compare(this, node, &cont); |
1060 } | 1060 } |
1061 | 1061 |
1062 | 1062 |
1063 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { | 1063 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { |
1064 FlagsContinuation cont(kUnorderedLessThanOrEqual, node); | 1064 FlagsContinuation cont(kUnsignedLessThanOrEqual, node); |
1065 VisitFloat64Compare(this, node, &cont); | 1065 VisitFloat64Compare(this, node, &cont); |
1066 } | 1066 } |
1067 | 1067 |
1068 | 1068 |
1069 // static | 1069 // static |
1070 MachineOperatorBuilder::Flags | 1070 MachineOperatorBuilder::Flags |
1071 InstructionSelector::SupportedMachineOperatorFlags() { | 1071 InstructionSelector::SupportedMachineOperatorFlags() { |
1072 return MachineOperatorBuilder::kFloat64Floor | | 1072 return MachineOperatorBuilder::kFloat64Floor | |
1073 MachineOperatorBuilder::kFloat64Ceil | | 1073 MachineOperatorBuilder::kFloat64Ceil | |
1074 MachineOperatorBuilder::kFloat64RoundTruncate; | 1074 MachineOperatorBuilder::kFloat64RoundTruncate; |
1075 } | 1075 } |
1076 | 1076 |
1077 } // namespace compiler | 1077 } // namespace compiler |
1078 } // namespace internal | 1078 } // namespace internal |
1079 } // namespace v8 | 1079 } // namespace v8 |
OLD | NEW |