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 1b12bd9aec745fef5fd65f9b7c498f5c64e6b115..d78a1d466cdc4fa7595aff5e24052b00f49f2a94 100644 |
--- a/src/compiler/mips64/instruction-selector-mips64.cc |
+++ b/src/compiler/mips64/instruction-selector-mips64.cc |
@@ -562,16 +562,30 @@ void InstructionSelector::VisitWord32Clz(Node* node) { |
} |
-void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } |
+void InstructionSelector::VisitWord32Ctz(Node* node) { |
+ Mips64OperandGenerator g(this); |
+ Emit(kMips64Ctz, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); |
+} |
-void InstructionSelector::VisitWord64Ctz(Node* node) { UNREACHABLE(); } |
+void InstructionSelector::VisitWord64Ctz(Node* node) { |
+ Mips64OperandGenerator g(this); |
+ Emit(kMips64Dctz, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); |
+} |
-void InstructionSelector::VisitWord32Popcnt(Node* node) { UNREACHABLE(); } |
+void InstructionSelector::VisitWord32Popcnt(Node* node) { |
+ Mips64OperandGenerator g(this); |
+ Emit(kMips64Popcnt, g.DefineAsRegister(node), |
+ g.UseRegister(node->InputAt(0))); |
+} |
-void InstructionSelector::VisitWord64Popcnt(Node* node) { UNREACHABLE(); } |
+void InstructionSelector::VisitWord64Popcnt(Node* node) { |
+ Mips64OperandGenerator g(this); |
+ Emit(kMips64Dpopcnt, g.DefineAsRegister(node), |
+ g.UseRegister(node->InputAt(0))); |
+} |
void InstructionSelector::VisitWord64Ror(Node* node) { |
@@ -1846,7 +1860,11 @@ void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { |
// static |
MachineOperatorBuilder::Flags |
InstructionSelector::SupportedMachineOperatorFlags() { |
- return MachineOperatorBuilder::kWord32ShiftIsSafe | |
+ return MachineOperatorBuilder::kWord32Ctz | |
+ MachineOperatorBuilder::kWord64Ctz | |
+ MachineOperatorBuilder::kWord32Popcnt | |
+ MachineOperatorBuilder::kWord64Popcnt | |
+ MachineOperatorBuilder::kWord32ShiftIsSafe | |
MachineOperatorBuilder::kInt32DivIsSafe | |
MachineOperatorBuilder::kUint32DivIsSafe | |
MachineOperatorBuilder::kFloat64Min | |