Index: src/compiler/mips64/instruction-selector-mips64.cc |
diff --git a/src/compiler/mips64/instruction-selector-mips64.cc b/src/compiler/mips64/instruction-selector-mips64.cc |
index 52da27f3ac67150b0e5cde91a3c92f4e5896b4c6..9fd208d376fb6512a10b426b755e7b306f099ae0 100644 |
--- a/src/compiler/mips64/instruction-selector-mips64.cc |
+++ b/src/compiler/mips64/instruction-selector-mips64.cc |
@@ -601,16 +601,28 @@ void InstructionSelector::VisitFloat64Mod(Node* node) { |
} |
-void InstructionSelector::VisitFloat32Max(Node* node) { UNREACHABLE(); } |
+void InstructionSelector::VisitFloat32Max(Node* node) { |
+ DCHECK(kArchVariant == kMips64r6); |
+ VisitRRR(this, kMips64MaxS, node); |
+} |
-void InstructionSelector::VisitFloat64Max(Node* node) { UNREACHABLE(); } |
+void InstructionSelector::VisitFloat64Max(Node* node) { |
+ DCHECK(kArchVariant == kMips64r6); |
+ VisitRRR(this, kMips64MaxD, node); |
+} |
-void InstructionSelector::VisitFloat32Min(Node* node) { UNREACHABLE(); } |
+void InstructionSelector::VisitFloat32Min(Node* node) { |
+ DCHECK(kArchVariant == kMips64r6); |
+ VisitRRR(this, kMips64MinS, node); |
+} |
-void InstructionSelector::VisitFloat64Min(Node* node) { UNREACHABLE(); } |
+void InstructionSelector::VisitFloat64Min(Node* node) { |
+ DCHECK(kArchVariant == kMips64r6); |
+ VisitRRR(this, kMips64MinD, node); |
+} |
void InstructionSelector::VisitFloat32Abs(Node* node) { |
@@ -1271,8 +1283,16 @@ void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { |
// static |
MachineOperatorBuilder::Flags |
InstructionSelector::SupportedMachineOperatorFlags() { |
- return MachineOperatorBuilder::kFloat64RoundDown | |
- MachineOperatorBuilder::kFloat64RoundTruncate; |
+ MachineOperatorBuilder::Flags flags = |
+ MachineOperatorBuilder::kFloat64RoundDown | |
+ MachineOperatorBuilder::kFloat64RoundTruncate; |
+ if (kArchVariant == kMips64r6) { |
+ flags |= MachineOperatorBuilder::kFloat32Max | |
+ MachineOperatorBuilder::kFloat32Min | |
+ MachineOperatorBuilder::kFloat64Max | |
+ MachineOperatorBuilder::kFloat64Min; |
+ } |
+ return flags; |
} |
} // namespace compiler |