Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 457e63789b26e0757f2f34747b9cc86654f738de..70d6ea8025adb73068a42b4bd61254790a1cb7f7 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1395,6 +1395,26 @@ 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()); |
+ } |
+ LMathMinMax* minmax = new(zone()) LMathMinMax(left, right); |
+ return DefineSameAsFirst(minmax); |
+} |
+ |
+ |
LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
ASSERT(instr->representation().IsDouble()); |
// We call a C function for double power. It can't trigger a GC. |