Index: src/compiler/mips/code-generator-mips.cc |
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc |
index dff8fd4f9509ad34d1ef176a1e5fc83fc7832504..ee9b40eb353a255e488b7c2228fa499198e160ea 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -1196,6 +1196,17 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
ASSEMBLE_ROUND_FLOAT_TO_FLOAT(round); |
break; |
} |
+ case kMipsFloat32Max: { |
+ Label compare_nan, done_compare; |
+ __ MaxNaNCheck_s(i.OutputSingleRegister(), i.InputSingleRegister(0), |
+ i.InputSingleRegister(1), &compare_nan); |
+ __ Branch(&done_compare); |
+ __ bind(&compare_nan); |
+ __ Move(i.OutputSingleRegister(), |
+ std::numeric_limits<float>::quiet_NaN()); |
+ __ bind(&done_compare); |
+ break; |
+ } |
case kMipsFloat64Max: { |
Label compare_nan, done_compare; |
__ MaxNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
@@ -1207,6 +1218,17 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
__ bind(&done_compare); |
break; |
} |
+ case kMipsFloat32Min: { |
+ Label compare_nan, done_compare; |
+ __ MinNaNCheck_s(i.OutputSingleRegister(), i.InputSingleRegister(0), |
+ i.InputSingleRegister(1), &compare_nan); |
+ __ Branch(&done_compare); |
+ __ bind(&compare_nan); |
+ __ Move(i.OutputSingleRegister(), |
+ std::numeric_limits<float>::quiet_NaN()); |
+ __ bind(&done_compare); |
+ break; |
+ } |
case kMipsFloat64Min: { |
Label compare_nan, done_compare; |
__ MinNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |