Index: src/mips/lithium-mips.cc |
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc |
index 3513d20bd1db65d47c5b78edf6117cbb48cd7ae3..6cbb2a123747ad5c0e6016c13ca1243068476f31 100644 |
--- a/src/mips/lithium-mips.cc |
+++ b/src/mips/lithium-mips.cc |
@@ -1296,6 +1296,25 @@ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { |
} |
+LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { |
+ LOperand* left = NULL; |
+ LOperand* right = NULL; |
+ if (instr->representation().IsInteger32()) { |
+ ASSERT(instr->left()->representation().IsInteger32()); |
+ ASSERT(instr->right()->representation().IsInteger32()); |
+ left = UseRegisterAtStart(instr->LeastConstantOperand()); |
+ right = UseOrConstantAtStart(instr->MostConstantOperand()); |
+ } else { |
+ ASSERT(instr->representation().IsDouble()); |
+ ASSERT(instr->left()->representation().IsDouble()); |
+ ASSERT(instr->right()->representation().IsDouble()); |
+ left = UseRegisterAtStart(instr->left()); |
+ right = UseRegisterAtStart(instr->right()); |
+ } |
+ return DefineAsRegister(new(zone()) LMathMinMax(left, right)); |
+} |
+ |
+ |
LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
ASSERT(instr->representation().IsDouble()); |
// We call a C function for double power. It can't trigger a GC. |