Index: src/compiler/mips/instruction-selector-mips.cc |
diff --git a/src/compiler/mips/instruction-selector-mips.cc b/src/compiler/mips/instruction-selector-mips.cc |
index 61cea76b22cc5c9a4f8a9c9f9250a3bfa7f80478..d400de9ec6bd59db50333eac1bea689bfa19ff47 100644 |
--- a/src/compiler/mips/instruction-selector-mips.cc |
+++ b/src/compiler/mips/instruction-selector-mips.cc |
@@ -401,10 +401,16 @@ void InstructionSelector::VisitWord32Clz(Node* node) { |
} |
-void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); } |
+void InstructionSelector::VisitWord32Ctz(Node* node) { |
+ MipsOperandGenerator g(this); |
+ Emit(kMipsCtz, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); |
+} |
-void InstructionSelector::VisitWord32Popcnt(Node* node) { UNREACHABLE(); } |
+void InstructionSelector::VisitWord32Popcnt(Node* node) { |
+ MipsOperandGenerator g(this); |
+ Emit(kMipsPopcnt, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); |
+} |
void InstructionSelector::VisitInt32Add(Node* node) { |
@@ -1318,7 +1324,9 @@ InstructionSelector::SupportedMachineOperatorFlags() { |
MachineOperatorBuilder::kFloat64RoundTruncate | |
MachineOperatorBuilder::kFloat64RoundTiesEven; |
} |
- return flags | MachineOperatorBuilder::kInt32DivIsSafe | |
+ return flags | MachineOperatorBuilder::kWord32Ctz | |
+ MachineOperatorBuilder::kWord32Popcnt | |
+ MachineOperatorBuilder::kInt32DivIsSafe | |
MachineOperatorBuilder::kUint32DivIsSafe | |
MachineOperatorBuilder::kWord32ShiftIsSafe | |
MachineOperatorBuilder::kFloat64Min | |